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.memcache.v1; 17 18 import static io.grpc.MethodDescriptor.generateFullMethodName; 19 20 /** 21 * 22 * 23 * <pre> 24 * Configures and manages Cloud Memorystore for Memcached instances. 25 * The `memcache.googleapis.com` service implements the Google Cloud Memorystore 26 * for Memcached API and defines the following resource model for managing 27 * Memorystore Memcached (also called Memcached below) instances: 28 * * The service works with a collection of cloud projects, named: `/projects/*` 29 * * Each project has a collection of available locations, named: `/locations/*` 30 * * Each location has a collection of Memcached instances, named: 31 * `/instances/*` 32 * * As such, Memcached instances are resources of the form: 33 * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` 34 * Note that location_id must be a GCP `region`; for example: 35 * * `projects/my-memcached-project/locations/us-central1/instances/my-memcached` 36 * </pre> 37 */ 38 @javax.annotation.Generated( 39 value = "by gRPC proto compiler", 40 comments = "Source: google/cloud/memcache/v1/cloud_memcache.proto") 41 @io.grpc.stub.annotations.GrpcGenerated 42 public final class CloudMemcacheGrpc { 43 CloudMemcacheGrpc()44 private CloudMemcacheGrpc() {} 45 46 public static final String SERVICE_NAME = "google.cloud.memcache.v1.CloudMemcache"; 47 48 // Static method descriptors that strictly reflect the proto. 49 private static volatile io.grpc.MethodDescriptor< 50 com.google.cloud.memcache.v1.ListInstancesRequest, 51 com.google.cloud.memcache.v1.ListInstancesResponse> 52 getListInstancesMethod; 53 54 @io.grpc.stub.annotations.RpcMethod( 55 fullMethodName = SERVICE_NAME + '/' + "ListInstances", 56 requestType = com.google.cloud.memcache.v1.ListInstancesRequest.class, 57 responseType = com.google.cloud.memcache.v1.ListInstancesResponse.class, 58 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 59 public static io.grpc.MethodDescriptor< 60 com.google.cloud.memcache.v1.ListInstancesRequest, 61 com.google.cloud.memcache.v1.ListInstancesResponse> getListInstancesMethod()62 getListInstancesMethod() { 63 io.grpc.MethodDescriptor< 64 com.google.cloud.memcache.v1.ListInstancesRequest, 65 com.google.cloud.memcache.v1.ListInstancesResponse> 66 getListInstancesMethod; 67 if ((getListInstancesMethod = CloudMemcacheGrpc.getListInstancesMethod) == null) { 68 synchronized (CloudMemcacheGrpc.class) { 69 if ((getListInstancesMethod = CloudMemcacheGrpc.getListInstancesMethod) == null) { 70 CloudMemcacheGrpc.getListInstancesMethod = 71 getListInstancesMethod = 72 io.grpc.MethodDescriptor 73 .<com.google.cloud.memcache.v1.ListInstancesRequest, 74 com.google.cloud.memcache.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.memcache.v1.ListInstancesRequest 82 .getDefaultInstance())) 83 .setResponseMarshaller( 84 io.grpc.protobuf.ProtoUtils.marshaller( 85 com.google.cloud.memcache.v1.ListInstancesResponse 86 .getDefaultInstance())) 87 .setSchemaDescriptor( 88 new CloudMemcacheMethodDescriptorSupplier("ListInstances")) 89 .build(); 90 } 91 } 92 } 93 return getListInstancesMethod; 94 } 95 96 private static volatile io.grpc.MethodDescriptor< 97 com.google.cloud.memcache.v1.GetInstanceRequest, com.google.cloud.memcache.v1.Instance> 98 getGetInstanceMethod; 99 100 @io.grpc.stub.annotations.RpcMethod( 101 fullMethodName = SERVICE_NAME + '/' + "GetInstance", 102 requestType = com.google.cloud.memcache.v1.GetInstanceRequest.class, 103 responseType = com.google.cloud.memcache.v1.Instance.class, 104 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 105 public static io.grpc.MethodDescriptor< 106 com.google.cloud.memcache.v1.GetInstanceRequest, com.google.cloud.memcache.v1.Instance> getGetInstanceMethod()107 getGetInstanceMethod() { 108 io.grpc.MethodDescriptor< 109 com.google.cloud.memcache.v1.GetInstanceRequest, com.google.cloud.memcache.v1.Instance> 110 getGetInstanceMethod; 111 if ((getGetInstanceMethod = CloudMemcacheGrpc.getGetInstanceMethod) == null) { 112 synchronized (CloudMemcacheGrpc.class) { 113 if ((getGetInstanceMethod = CloudMemcacheGrpc.getGetInstanceMethod) == null) { 114 CloudMemcacheGrpc.getGetInstanceMethod = 115 getGetInstanceMethod = 116 io.grpc.MethodDescriptor 117 .<com.google.cloud.memcache.v1.GetInstanceRequest, 118 com.google.cloud.memcache.v1.Instance> 119 newBuilder() 120 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 121 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstance")) 122 .setSampledToLocalTracing(true) 123 .setRequestMarshaller( 124 io.grpc.protobuf.ProtoUtils.marshaller( 125 com.google.cloud.memcache.v1.GetInstanceRequest.getDefaultInstance())) 126 .setResponseMarshaller( 127 io.grpc.protobuf.ProtoUtils.marshaller( 128 com.google.cloud.memcache.v1.Instance.getDefaultInstance())) 129 .setSchemaDescriptor(new CloudMemcacheMethodDescriptorSupplier("GetInstance")) 130 .build(); 131 } 132 } 133 } 134 return getGetInstanceMethod; 135 } 136 137 private static volatile io.grpc.MethodDescriptor< 138 com.google.cloud.memcache.v1.CreateInstanceRequest, com.google.longrunning.Operation> 139 getCreateInstanceMethod; 140 141 @io.grpc.stub.annotations.RpcMethod( 142 fullMethodName = SERVICE_NAME + '/' + "CreateInstance", 143 requestType = com.google.cloud.memcache.v1.CreateInstanceRequest.class, 144 responseType = com.google.longrunning.Operation.class, 145 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 146 public static io.grpc.MethodDescriptor< 147 com.google.cloud.memcache.v1.CreateInstanceRequest, com.google.longrunning.Operation> getCreateInstanceMethod()148 getCreateInstanceMethod() { 149 io.grpc.MethodDescriptor< 150 com.google.cloud.memcache.v1.CreateInstanceRequest, com.google.longrunning.Operation> 151 getCreateInstanceMethod; 152 if ((getCreateInstanceMethod = CloudMemcacheGrpc.getCreateInstanceMethod) == null) { 153 synchronized (CloudMemcacheGrpc.class) { 154 if ((getCreateInstanceMethod = CloudMemcacheGrpc.getCreateInstanceMethod) == null) { 155 CloudMemcacheGrpc.getCreateInstanceMethod = 156 getCreateInstanceMethod = 157 io.grpc.MethodDescriptor 158 .<com.google.cloud.memcache.v1.CreateInstanceRequest, 159 com.google.longrunning.Operation> 160 newBuilder() 161 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 162 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateInstance")) 163 .setSampledToLocalTracing(true) 164 .setRequestMarshaller( 165 io.grpc.protobuf.ProtoUtils.marshaller( 166 com.google.cloud.memcache.v1.CreateInstanceRequest 167 .getDefaultInstance())) 168 .setResponseMarshaller( 169 io.grpc.protobuf.ProtoUtils.marshaller( 170 com.google.longrunning.Operation.getDefaultInstance())) 171 .setSchemaDescriptor( 172 new CloudMemcacheMethodDescriptorSupplier("CreateInstance")) 173 .build(); 174 } 175 } 176 } 177 return getCreateInstanceMethod; 178 } 179 180 private static volatile io.grpc.MethodDescriptor< 181 com.google.cloud.memcache.v1.UpdateInstanceRequest, com.google.longrunning.Operation> 182 getUpdateInstanceMethod; 183 184 @io.grpc.stub.annotations.RpcMethod( 185 fullMethodName = SERVICE_NAME + '/' + "UpdateInstance", 186 requestType = com.google.cloud.memcache.v1.UpdateInstanceRequest.class, 187 responseType = com.google.longrunning.Operation.class, 188 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 189 public static io.grpc.MethodDescriptor< 190 com.google.cloud.memcache.v1.UpdateInstanceRequest, com.google.longrunning.Operation> getUpdateInstanceMethod()191 getUpdateInstanceMethod() { 192 io.grpc.MethodDescriptor< 193 com.google.cloud.memcache.v1.UpdateInstanceRequest, com.google.longrunning.Operation> 194 getUpdateInstanceMethod; 195 if ((getUpdateInstanceMethod = CloudMemcacheGrpc.getUpdateInstanceMethod) == null) { 196 synchronized (CloudMemcacheGrpc.class) { 197 if ((getUpdateInstanceMethod = CloudMemcacheGrpc.getUpdateInstanceMethod) == null) { 198 CloudMemcacheGrpc.getUpdateInstanceMethod = 199 getUpdateInstanceMethod = 200 io.grpc.MethodDescriptor 201 .<com.google.cloud.memcache.v1.UpdateInstanceRequest, 202 com.google.longrunning.Operation> 203 newBuilder() 204 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 205 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateInstance")) 206 .setSampledToLocalTracing(true) 207 .setRequestMarshaller( 208 io.grpc.protobuf.ProtoUtils.marshaller( 209 com.google.cloud.memcache.v1.UpdateInstanceRequest 210 .getDefaultInstance())) 211 .setResponseMarshaller( 212 io.grpc.protobuf.ProtoUtils.marshaller( 213 com.google.longrunning.Operation.getDefaultInstance())) 214 .setSchemaDescriptor( 215 new CloudMemcacheMethodDescriptorSupplier("UpdateInstance")) 216 .build(); 217 } 218 } 219 } 220 return getUpdateInstanceMethod; 221 } 222 223 private static volatile io.grpc.MethodDescriptor< 224 com.google.cloud.memcache.v1.UpdateParametersRequest, com.google.longrunning.Operation> 225 getUpdateParametersMethod; 226 227 @io.grpc.stub.annotations.RpcMethod( 228 fullMethodName = SERVICE_NAME + '/' + "UpdateParameters", 229 requestType = com.google.cloud.memcache.v1.UpdateParametersRequest.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.memcache.v1.UpdateParametersRequest, com.google.longrunning.Operation> getUpdateParametersMethod()234 getUpdateParametersMethod() { 235 io.grpc.MethodDescriptor< 236 com.google.cloud.memcache.v1.UpdateParametersRequest, com.google.longrunning.Operation> 237 getUpdateParametersMethod; 238 if ((getUpdateParametersMethod = CloudMemcacheGrpc.getUpdateParametersMethod) == null) { 239 synchronized (CloudMemcacheGrpc.class) { 240 if ((getUpdateParametersMethod = CloudMemcacheGrpc.getUpdateParametersMethod) == null) { 241 CloudMemcacheGrpc.getUpdateParametersMethod = 242 getUpdateParametersMethod = 243 io.grpc.MethodDescriptor 244 .<com.google.cloud.memcache.v1.UpdateParametersRequest, 245 com.google.longrunning.Operation> 246 newBuilder() 247 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 248 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateParameters")) 249 .setSampledToLocalTracing(true) 250 .setRequestMarshaller( 251 io.grpc.protobuf.ProtoUtils.marshaller( 252 com.google.cloud.memcache.v1.UpdateParametersRequest 253 .getDefaultInstance())) 254 .setResponseMarshaller( 255 io.grpc.protobuf.ProtoUtils.marshaller( 256 com.google.longrunning.Operation.getDefaultInstance())) 257 .setSchemaDescriptor( 258 new CloudMemcacheMethodDescriptorSupplier("UpdateParameters")) 259 .build(); 260 } 261 } 262 } 263 return getUpdateParametersMethod; 264 } 265 266 private static volatile io.grpc.MethodDescriptor< 267 com.google.cloud.memcache.v1.DeleteInstanceRequest, com.google.longrunning.Operation> 268 getDeleteInstanceMethod; 269 270 @io.grpc.stub.annotations.RpcMethod( 271 fullMethodName = SERVICE_NAME + '/' + "DeleteInstance", 272 requestType = com.google.cloud.memcache.v1.DeleteInstanceRequest.class, 273 responseType = com.google.longrunning.Operation.class, 274 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 275 public static io.grpc.MethodDescriptor< 276 com.google.cloud.memcache.v1.DeleteInstanceRequest, com.google.longrunning.Operation> getDeleteInstanceMethod()277 getDeleteInstanceMethod() { 278 io.grpc.MethodDescriptor< 279 com.google.cloud.memcache.v1.DeleteInstanceRequest, com.google.longrunning.Operation> 280 getDeleteInstanceMethod; 281 if ((getDeleteInstanceMethod = CloudMemcacheGrpc.getDeleteInstanceMethod) == null) { 282 synchronized (CloudMemcacheGrpc.class) { 283 if ((getDeleteInstanceMethod = CloudMemcacheGrpc.getDeleteInstanceMethod) == null) { 284 CloudMemcacheGrpc.getDeleteInstanceMethod = 285 getDeleteInstanceMethod = 286 io.grpc.MethodDescriptor 287 .<com.google.cloud.memcache.v1.DeleteInstanceRequest, 288 com.google.longrunning.Operation> 289 newBuilder() 290 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 291 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteInstance")) 292 .setSampledToLocalTracing(true) 293 .setRequestMarshaller( 294 io.grpc.protobuf.ProtoUtils.marshaller( 295 com.google.cloud.memcache.v1.DeleteInstanceRequest 296 .getDefaultInstance())) 297 .setResponseMarshaller( 298 io.grpc.protobuf.ProtoUtils.marshaller( 299 com.google.longrunning.Operation.getDefaultInstance())) 300 .setSchemaDescriptor( 301 new CloudMemcacheMethodDescriptorSupplier("DeleteInstance")) 302 .build(); 303 } 304 } 305 } 306 return getDeleteInstanceMethod; 307 } 308 309 private static volatile io.grpc.MethodDescriptor< 310 com.google.cloud.memcache.v1.ApplyParametersRequest, com.google.longrunning.Operation> 311 getApplyParametersMethod; 312 313 @io.grpc.stub.annotations.RpcMethod( 314 fullMethodName = SERVICE_NAME + '/' + "ApplyParameters", 315 requestType = com.google.cloud.memcache.v1.ApplyParametersRequest.class, 316 responseType = com.google.longrunning.Operation.class, 317 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 318 public static io.grpc.MethodDescriptor< 319 com.google.cloud.memcache.v1.ApplyParametersRequest, com.google.longrunning.Operation> getApplyParametersMethod()320 getApplyParametersMethod() { 321 io.grpc.MethodDescriptor< 322 com.google.cloud.memcache.v1.ApplyParametersRequest, com.google.longrunning.Operation> 323 getApplyParametersMethod; 324 if ((getApplyParametersMethod = CloudMemcacheGrpc.getApplyParametersMethod) == null) { 325 synchronized (CloudMemcacheGrpc.class) { 326 if ((getApplyParametersMethod = CloudMemcacheGrpc.getApplyParametersMethod) == null) { 327 CloudMemcacheGrpc.getApplyParametersMethod = 328 getApplyParametersMethod = 329 io.grpc.MethodDescriptor 330 .<com.google.cloud.memcache.v1.ApplyParametersRequest, 331 com.google.longrunning.Operation> 332 newBuilder() 333 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 334 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ApplyParameters")) 335 .setSampledToLocalTracing(true) 336 .setRequestMarshaller( 337 io.grpc.protobuf.ProtoUtils.marshaller( 338 com.google.cloud.memcache.v1.ApplyParametersRequest 339 .getDefaultInstance())) 340 .setResponseMarshaller( 341 io.grpc.protobuf.ProtoUtils.marshaller( 342 com.google.longrunning.Operation.getDefaultInstance())) 343 .setSchemaDescriptor( 344 new CloudMemcacheMethodDescriptorSupplier("ApplyParameters")) 345 .build(); 346 } 347 } 348 } 349 return getApplyParametersMethod; 350 } 351 352 private static volatile io.grpc.MethodDescriptor< 353 com.google.cloud.memcache.v1.RescheduleMaintenanceRequest, 354 com.google.longrunning.Operation> 355 getRescheduleMaintenanceMethod; 356 357 @io.grpc.stub.annotations.RpcMethod( 358 fullMethodName = SERVICE_NAME + '/' + "RescheduleMaintenance", 359 requestType = com.google.cloud.memcache.v1.RescheduleMaintenanceRequest.class, 360 responseType = com.google.longrunning.Operation.class, 361 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 362 public static io.grpc.MethodDescriptor< 363 com.google.cloud.memcache.v1.RescheduleMaintenanceRequest, 364 com.google.longrunning.Operation> getRescheduleMaintenanceMethod()365 getRescheduleMaintenanceMethod() { 366 io.grpc.MethodDescriptor< 367 com.google.cloud.memcache.v1.RescheduleMaintenanceRequest, 368 com.google.longrunning.Operation> 369 getRescheduleMaintenanceMethod; 370 if ((getRescheduleMaintenanceMethod = CloudMemcacheGrpc.getRescheduleMaintenanceMethod) 371 == null) { 372 synchronized (CloudMemcacheGrpc.class) { 373 if ((getRescheduleMaintenanceMethod = CloudMemcacheGrpc.getRescheduleMaintenanceMethod) 374 == null) { 375 CloudMemcacheGrpc.getRescheduleMaintenanceMethod = 376 getRescheduleMaintenanceMethod = 377 io.grpc.MethodDescriptor 378 .<com.google.cloud.memcache.v1.RescheduleMaintenanceRequest, 379 com.google.longrunning.Operation> 380 newBuilder() 381 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 382 .setFullMethodName( 383 generateFullMethodName(SERVICE_NAME, "RescheduleMaintenance")) 384 .setSampledToLocalTracing(true) 385 .setRequestMarshaller( 386 io.grpc.protobuf.ProtoUtils.marshaller( 387 com.google.cloud.memcache.v1.RescheduleMaintenanceRequest 388 .getDefaultInstance())) 389 .setResponseMarshaller( 390 io.grpc.protobuf.ProtoUtils.marshaller( 391 com.google.longrunning.Operation.getDefaultInstance())) 392 .setSchemaDescriptor( 393 new CloudMemcacheMethodDescriptorSupplier("RescheduleMaintenance")) 394 .build(); 395 } 396 } 397 } 398 return getRescheduleMaintenanceMethod; 399 } 400 401 /** Creates a new async stub that supports all call types for the service */ newStub(io.grpc.Channel channel)402 public static CloudMemcacheStub newStub(io.grpc.Channel channel) { 403 io.grpc.stub.AbstractStub.StubFactory<CloudMemcacheStub> factory = 404 new io.grpc.stub.AbstractStub.StubFactory<CloudMemcacheStub>() { 405 @java.lang.Override 406 public CloudMemcacheStub newStub( 407 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 408 return new CloudMemcacheStub(channel, callOptions); 409 } 410 }; 411 return CloudMemcacheStub.newStub(factory, channel); 412 } 413 414 /** 415 * Creates a new blocking-style stub that supports unary and streaming output calls on the service 416 */ newBlockingStub(io.grpc.Channel channel)417 public static CloudMemcacheBlockingStub newBlockingStub(io.grpc.Channel channel) { 418 io.grpc.stub.AbstractStub.StubFactory<CloudMemcacheBlockingStub> factory = 419 new io.grpc.stub.AbstractStub.StubFactory<CloudMemcacheBlockingStub>() { 420 @java.lang.Override 421 public CloudMemcacheBlockingStub newStub( 422 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 423 return new CloudMemcacheBlockingStub(channel, callOptions); 424 } 425 }; 426 return CloudMemcacheBlockingStub.newStub(factory, channel); 427 } 428 429 /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ newFutureStub(io.grpc.Channel channel)430 public static CloudMemcacheFutureStub newFutureStub(io.grpc.Channel channel) { 431 io.grpc.stub.AbstractStub.StubFactory<CloudMemcacheFutureStub> factory = 432 new io.grpc.stub.AbstractStub.StubFactory<CloudMemcacheFutureStub>() { 433 @java.lang.Override 434 public CloudMemcacheFutureStub newStub( 435 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 436 return new CloudMemcacheFutureStub(channel, callOptions); 437 } 438 }; 439 return CloudMemcacheFutureStub.newStub(factory, channel); 440 } 441 442 /** 443 * 444 * 445 * <pre> 446 * Configures and manages Cloud Memorystore for Memcached instances. 447 * The `memcache.googleapis.com` service implements the Google Cloud Memorystore 448 * for Memcached API and defines the following resource model for managing 449 * Memorystore Memcached (also called Memcached below) instances: 450 * * The service works with a collection of cloud projects, named: `/projects/*` 451 * * Each project has a collection of available locations, named: `/locations/*` 452 * * Each location has a collection of Memcached instances, named: 453 * `/instances/*` 454 * * As such, Memcached instances are resources of the form: 455 * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` 456 * Note that location_id must be a GCP `region`; for example: 457 * * `projects/my-memcached-project/locations/us-central1/instances/my-memcached` 458 * </pre> 459 */ 460 public interface AsyncService { 461 462 /** 463 * 464 * 465 * <pre> 466 * Lists Instances in a given location. 467 * </pre> 468 */ listInstances( com.google.cloud.memcache.v1.ListInstancesRequest request, io.grpc.stub.StreamObserver<com.google.cloud.memcache.v1.ListInstancesResponse> responseObserver)469 default void listInstances( 470 com.google.cloud.memcache.v1.ListInstancesRequest request, 471 io.grpc.stub.StreamObserver<com.google.cloud.memcache.v1.ListInstancesResponse> 472 responseObserver) { 473 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 474 getListInstancesMethod(), responseObserver); 475 } 476 477 /** 478 * 479 * 480 * <pre> 481 * Gets details of a single Instance. 482 * </pre> 483 */ getInstance( com.google.cloud.memcache.v1.GetInstanceRequest request, io.grpc.stub.StreamObserver<com.google.cloud.memcache.v1.Instance> responseObserver)484 default void getInstance( 485 com.google.cloud.memcache.v1.GetInstanceRequest request, 486 io.grpc.stub.StreamObserver<com.google.cloud.memcache.v1.Instance> responseObserver) { 487 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 488 getGetInstanceMethod(), responseObserver); 489 } 490 491 /** 492 * 493 * 494 * <pre> 495 * Creates a new Instance in a given location. 496 * </pre> 497 */ createInstance( com.google.cloud.memcache.v1.CreateInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)498 default void createInstance( 499 com.google.cloud.memcache.v1.CreateInstanceRequest request, 500 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 501 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 502 getCreateInstanceMethod(), responseObserver); 503 } 504 505 /** 506 * 507 * 508 * <pre> 509 * Updates an existing Instance in a given project and location. 510 * </pre> 511 */ updateInstance( com.google.cloud.memcache.v1.UpdateInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)512 default void updateInstance( 513 com.google.cloud.memcache.v1.UpdateInstanceRequest request, 514 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 515 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 516 getUpdateInstanceMethod(), responseObserver); 517 } 518 519 /** 520 * 521 * 522 * <pre> 523 * Updates the defined Memcached parameters for an existing instance. 524 * This method only stages the parameters, it must be followed by 525 * `ApplyParameters` to apply the parameters to nodes of the Memcached 526 * instance. 527 * </pre> 528 */ updateParameters( com.google.cloud.memcache.v1.UpdateParametersRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)529 default void updateParameters( 530 com.google.cloud.memcache.v1.UpdateParametersRequest request, 531 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 532 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 533 getUpdateParametersMethod(), responseObserver); 534 } 535 536 /** 537 * 538 * 539 * <pre> 540 * Deletes a single Instance. 541 * </pre> 542 */ deleteInstance( com.google.cloud.memcache.v1.DeleteInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)543 default void deleteInstance( 544 com.google.cloud.memcache.v1.DeleteInstanceRequest request, 545 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 546 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 547 getDeleteInstanceMethod(), responseObserver); 548 } 549 550 /** 551 * 552 * 553 * <pre> 554 * `ApplyParameters` restarts the set of specified nodes in order to update 555 * them to the current set of parameters for the Memcached Instance. 556 * </pre> 557 */ applyParameters( com.google.cloud.memcache.v1.ApplyParametersRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)558 default void applyParameters( 559 com.google.cloud.memcache.v1.ApplyParametersRequest request, 560 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 561 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 562 getApplyParametersMethod(), responseObserver); 563 } 564 565 /** 566 * 567 * 568 * <pre> 569 * Reschedules upcoming maintenance event. 570 * </pre> 571 */ rescheduleMaintenance( com.google.cloud.memcache.v1.RescheduleMaintenanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)572 default void rescheduleMaintenance( 573 com.google.cloud.memcache.v1.RescheduleMaintenanceRequest request, 574 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 575 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 576 getRescheduleMaintenanceMethod(), responseObserver); 577 } 578 } 579 580 /** 581 * Base class for the server implementation of the service CloudMemcache. 582 * 583 * <pre> 584 * Configures and manages Cloud Memorystore for Memcached instances. 585 * The `memcache.googleapis.com` service implements the Google Cloud Memorystore 586 * for Memcached API and defines the following resource model for managing 587 * Memorystore Memcached (also called Memcached below) instances: 588 * * The service works with a collection of cloud projects, named: `/projects/*` 589 * * Each project has a collection of available locations, named: `/locations/*` 590 * * Each location has a collection of Memcached instances, named: 591 * `/instances/*` 592 * * As such, Memcached instances are resources of the form: 593 * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` 594 * Note that location_id must be a GCP `region`; for example: 595 * * `projects/my-memcached-project/locations/us-central1/instances/my-memcached` 596 * </pre> 597 */ 598 public abstract static class CloudMemcacheImplBase 599 implements io.grpc.BindableService, AsyncService { 600 601 @java.lang.Override bindService()602 public final io.grpc.ServerServiceDefinition bindService() { 603 return CloudMemcacheGrpc.bindService(this); 604 } 605 } 606 607 /** 608 * A stub to allow clients to do asynchronous rpc calls to service CloudMemcache. 609 * 610 * <pre> 611 * Configures and manages Cloud Memorystore for Memcached instances. 612 * The `memcache.googleapis.com` service implements the Google Cloud Memorystore 613 * for Memcached API and defines the following resource model for managing 614 * Memorystore Memcached (also called Memcached below) instances: 615 * * The service works with a collection of cloud projects, named: `/projects/*` 616 * * Each project has a collection of available locations, named: `/locations/*` 617 * * Each location has a collection of Memcached instances, named: 618 * `/instances/*` 619 * * As such, Memcached instances are resources of the form: 620 * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` 621 * Note that location_id must be a GCP `region`; for example: 622 * * `projects/my-memcached-project/locations/us-central1/instances/my-memcached` 623 * </pre> 624 */ 625 public static final class CloudMemcacheStub 626 extends io.grpc.stub.AbstractAsyncStub<CloudMemcacheStub> { CloudMemcacheStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)627 private CloudMemcacheStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 628 super(channel, callOptions); 629 } 630 631 @java.lang.Override build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)632 protected CloudMemcacheStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 633 return new CloudMemcacheStub(channel, callOptions); 634 } 635 636 /** 637 * 638 * 639 * <pre> 640 * Lists Instances in a given location. 641 * </pre> 642 */ listInstances( com.google.cloud.memcache.v1.ListInstancesRequest request, io.grpc.stub.StreamObserver<com.google.cloud.memcache.v1.ListInstancesResponse> responseObserver)643 public void listInstances( 644 com.google.cloud.memcache.v1.ListInstancesRequest request, 645 io.grpc.stub.StreamObserver<com.google.cloud.memcache.v1.ListInstancesResponse> 646 responseObserver) { 647 io.grpc.stub.ClientCalls.asyncUnaryCall( 648 getChannel().newCall(getListInstancesMethod(), getCallOptions()), 649 request, 650 responseObserver); 651 } 652 653 /** 654 * 655 * 656 * <pre> 657 * Gets details of a single Instance. 658 * </pre> 659 */ getInstance( com.google.cloud.memcache.v1.GetInstanceRequest request, io.grpc.stub.StreamObserver<com.google.cloud.memcache.v1.Instance> responseObserver)660 public void getInstance( 661 com.google.cloud.memcache.v1.GetInstanceRequest request, 662 io.grpc.stub.StreamObserver<com.google.cloud.memcache.v1.Instance> responseObserver) { 663 io.grpc.stub.ClientCalls.asyncUnaryCall( 664 getChannel().newCall(getGetInstanceMethod(), getCallOptions()), 665 request, 666 responseObserver); 667 } 668 669 /** 670 * 671 * 672 * <pre> 673 * Creates a new Instance in a given location. 674 * </pre> 675 */ createInstance( com.google.cloud.memcache.v1.CreateInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)676 public void createInstance( 677 com.google.cloud.memcache.v1.CreateInstanceRequest request, 678 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 679 io.grpc.stub.ClientCalls.asyncUnaryCall( 680 getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), 681 request, 682 responseObserver); 683 } 684 685 /** 686 * 687 * 688 * <pre> 689 * Updates an existing Instance in a given project and location. 690 * </pre> 691 */ updateInstance( com.google.cloud.memcache.v1.UpdateInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)692 public void updateInstance( 693 com.google.cloud.memcache.v1.UpdateInstanceRequest request, 694 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 695 io.grpc.stub.ClientCalls.asyncUnaryCall( 696 getChannel().newCall(getUpdateInstanceMethod(), getCallOptions()), 697 request, 698 responseObserver); 699 } 700 701 /** 702 * 703 * 704 * <pre> 705 * Updates the defined Memcached parameters for an existing instance. 706 * This method only stages the parameters, it must be followed by 707 * `ApplyParameters` to apply the parameters to nodes of the Memcached 708 * instance. 709 * </pre> 710 */ updateParameters( com.google.cloud.memcache.v1.UpdateParametersRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)711 public void updateParameters( 712 com.google.cloud.memcache.v1.UpdateParametersRequest request, 713 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 714 io.grpc.stub.ClientCalls.asyncUnaryCall( 715 getChannel().newCall(getUpdateParametersMethod(), getCallOptions()), 716 request, 717 responseObserver); 718 } 719 720 /** 721 * 722 * 723 * <pre> 724 * Deletes a single Instance. 725 * </pre> 726 */ deleteInstance( com.google.cloud.memcache.v1.DeleteInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)727 public void deleteInstance( 728 com.google.cloud.memcache.v1.DeleteInstanceRequest request, 729 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 730 io.grpc.stub.ClientCalls.asyncUnaryCall( 731 getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), 732 request, 733 responseObserver); 734 } 735 736 /** 737 * 738 * 739 * <pre> 740 * `ApplyParameters` restarts the set of specified nodes in order to update 741 * them to the current set of parameters for the Memcached Instance. 742 * </pre> 743 */ applyParameters( com.google.cloud.memcache.v1.ApplyParametersRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)744 public void applyParameters( 745 com.google.cloud.memcache.v1.ApplyParametersRequest request, 746 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 747 io.grpc.stub.ClientCalls.asyncUnaryCall( 748 getChannel().newCall(getApplyParametersMethod(), getCallOptions()), 749 request, 750 responseObserver); 751 } 752 753 /** 754 * 755 * 756 * <pre> 757 * Reschedules upcoming maintenance event. 758 * </pre> 759 */ rescheduleMaintenance( com.google.cloud.memcache.v1.RescheduleMaintenanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)760 public void rescheduleMaintenance( 761 com.google.cloud.memcache.v1.RescheduleMaintenanceRequest request, 762 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 763 io.grpc.stub.ClientCalls.asyncUnaryCall( 764 getChannel().newCall(getRescheduleMaintenanceMethod(), getCallOptions()), 765 request, 766 responseObserver); 767 } 768 } 769 770 /** 771 * A stub to allow clients to do synchronous rpc calls to service CloudMemcache. 772 * 773 * <pre> 774 * Configures and manages Cloud Memorystore for Memcached instances. 775 * The `memcache.googleapis.com` service implements the Google Cloud Memorystore 776 * for Memcached API and defines the following resource model for managing 777 * Memorystore Memcached (also called Memcached below) instances: 778 * * The service works with a collection of cloud projects, named: `/projects/*` 779 * * Each project has a collection of available locations, named: `/locations/*` 780 * * Each location has a collection of Memcached instances, named: 781 * `/instances/*` 782 * * As such, Memcached instances are resources of the form: 783 * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` 784 * Note that location_id must be a GCP `region`; for example: 785 * * `projects/my-memcached-project/locations/us-central1/instances/my-memcached` 786 * </pre> 787 */ 788 public static final class CloudMemcacheBlockingStub 789 extends io.grpc.stub.AbstractBlockingStub<CloudMemcacheBlockingStub> { CloudMemcacheBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)790 private CloudMemcacheBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 791 super(channel, callOptions); 792 } 793 794 @java.lang.Override build( io.grpc.Channel channel, io.grpc.CallOptions callOptions)795 protected CloudMemcacheBlockingStub build( 796 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 797 return new CloudMemcacheBlockingStub(channel, callOptions); 798 } 799 800 /** 801 * 802 * 803 * <pre> 804 * Lists Instances in a given location. 805 * </pre> 806 */ listInstances( com.google.cloud.memcache.v1.ListInstancesRequest request)807 public com.google.cloud.memcache.v1.ListInstancesResponse listInstances( 808 com.google.cloud.memcache.v1.ListInstancesRequest request) { 809 return io.grpc.stub.ClientCalls.blockingUnaryCall( 810 getChannel(), getListInstancesMethod(), getCallOptions(), request); 811 } 812 813 /** 814 * 815 * 816 * <pre> 817 * Gets details of a single Instance. 818 * </pre> 819 */ getInstance( com.google.cloud.memcache.v1.GetInstanceRequest request)820 public com.google.cloud.memcache.v1.Instance getInstance( 821 com.google.cloud.memcache.v1.GetInstanceRequest request) { 822 return io.grpc.stub.ClientCalls.blockingUnaryCall( 823 getChannel(), getGetInstanceMethod(), getCallOptions(), request); 824 } 825 826 /** 827 * 828 * 829 * <pre> 830 * Creates a new Instance in a given location. 831 * </pre> 832 */ createInstance( com.google.cloud.memcache.v1.CreateInstanceRequest request)833 public com.google.longrunning.Operation createInstance( 834 com.google.cloud.memcache.v1.CreateInstanceRequest request) { 835 return io.grpc.stub.ClientCalls.blockingUnaryCall( 836 getChannel(), getCreateInstanceMethod(), getCallOptions(), request); 837 } 838 839 /** 840 * 841 * 842 * <pre> 843 * Updates an existing Instance in a given project and location. 844 * </pre> 845 */ updateInstance( com.google.cloud.memcache.v1.UpdateInstanceRequest request)846 public com.google.longrunning.Operation updateInstance( 847 com.google.cloud.memcache.v1.UpdateInstanceRequest request) { 848 return io.grpc.stub.ClientCalls.blockingUnaryCall( 849 getChannel(), getUpdateInstanceMethod(), getCallOptions(), request); 850 } 851 852 /** 853 * 854 * 855 * <pre> 856 * Updates the defined Memcached parameters for an existing instance. 857 * This method only stages the parameters, it must be followed by 858 * `ApplyParameters` to apply the parameters to nodes of the Memcached 859 * instance. 860 * </pre> 861 */ updateParameters( com.google.cloud.memcache.v1.UpdateParametersRequest request)862 public com.google.longrunning.Operation updateParameters( 863 com.google.cloud.memcache.v1.UpdateParametersRequest request) { 864 return io.grpc.stub.ClientCalls.blockingUnaryCall( 865 getChannel(), getUpdateParametersMethod(), getCallOptions(), request); 866 } 867 868 /** 869 * 870 * 871 * <pre> 872 * Deletes a single Instance. 873 * </pre> 874 */ deleteInstance( com.google.cloud.memcache.v1.DeleteInstanceRequest request)875 public com.google.longrunning.Operation deleteInstance( 876 com.google.cloud.memcache.v1.DeleteInstanceRequest request) { 877 return io.grpc.stub.ClientCalls.blockingUnaryCall( 878 getChannel(), getDeleteInstanceMethod(), getCallOptions(), request); 879 } 880 881 /** 882 * 883 * 884 * <pre> 885 * `ApplyParameters` restarts the set of specified nodes in order to update 886 * them to the current set of parameters for the Memcached Instance. 887 * </pre> 888 */ applyParameters( com.google.cloud.memcache.v1.ApplyParametersRequest request)889 public com.google.longrunning.Operation applyParameters( 890 com.google.cloud.memcache.v1.ApplyParametersRequest request) { 891 return io.grpc.stub.ClientCalls.blockingUnaryCall( 892 getChannel(), getApplyParametersMethod(), getCallOptions(), request); 893 } 894 895 /** 896 * 897 * 898 * <pre> 899 * Reschedules upcoming maintenance event. 900 * </pre> 901 */ rescheduleMaintenance( com.google.cloud.memcache.v1.RescheduleMaintenanceRequest request)902 public com.google.longrunning.Operation rescheduleMaintenance( 903 com.google.cloud.memcache.v1.RescheduleMaintenanceRequest request) { 904 return io.grpc.stub.ClientCalls.blockingUnaryCall( 905 getChannel(), getRescheduleMaintenanceMethod(), getCallOptions(), request); 906 } 907 } 908 909 /** 910 * A stub to allow clients to do ListenableFuture-style rpc calls to service CloudMemcache. 911 * 912 * <pre> 913 * Configures and manages Cloud Memorystore for Memcached instances. 914 * The `memcache.googleapis.com` service implements the Google Cloud Memorystore 915 * for Memcached API and defines the following resource model for managing 916 * Memorystore Memcached (also called Memcached below) instances: 917 * * The service works with a collection of cloud projects, named: `/projects/*` 918 * * Each project has a collection of available locations, named: `/locations/*` 919 * * Each location has a collection of Memcached instances, named: 920 * `/instances/*` 921 * * As such, Memcached instances are resources of the form: 922 * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` 923 * Note that location_id must be a GCP `region`; for example: 924 * * `projects/my-memcached-project/locations/us-central1/instances/my-memcached` 925 * </pre> 926 */ 927 public static final class CloudMemcacheFutureStub 928 extends io.grpc.stub.AbstractFutureStub<CloudMemcacheFutureStub> { CloudMemcacheFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)929 private CloudMemcacheFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 930 super(channel, callOptions); 931 } 932 933 @java.lang.Override build( io.grpc.Channel channel, io.grpc.CallOptions callOptions)934 protected CloudMemcacheFutureStub build( 935 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 936 return new CloudMemcacheFutureStub(channel, callOptions); 937 } 938 939 /** 940 * 941 * 942 * <pre> 943 * Lists Instances in a given location. 944 * </pre> 945 */ 946 public com.google.common.util.concurrent.ListenableFuture< 947 com.google.cloud.memcache.v1.ListInstancesResponse> listInstances(com.google.cloud.memcache.v1.ListInstancesRequest request)948 listInstances(com.google.cloud.memcache.v1.ListInstancesRequest request) { 949 return io.grpc.stub.ClientCalls.futureUnaryCall( 950 getChannel().newCall(getListInstancesMethod(), getCallOptions()), request); 951 } 952 953 /** 954 * 955 * 956 * <pre> 957 * Gets details of a single Instance. 958 * </pre> 959 */ 960 public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.memcache.v1.Instance> getInstance(com.google.cloud.memcache.v1.GetInstanceRequest request)961 getInstance(com.google.cloud.memcache.v1.GetInstanceRequest request) { 962 return io.grpc.stub.ClientCalls.futureUnaryCall( 963 getChannel().newCall(getGetInstanceMethod(), getCallOptions()), request); 964 } 965 966 /** 967 * 968 * 969 * <pre> 970 * Creates a new Instance in a given location. 971 * </pre> 972 */ 973 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> createInstance(com.google.cloud.memcache.v1.CreateInstanceRequest request)974 createInstance(com.google.cloud.memcache.v1.CreateInstanceRequest request) { 975 return io.grpc.stub.ClientCalls.futureUnaryCall( 976 getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), request); 977 } 978 979 /** 980 * 981 * 982 * <pre> 983 * Updates an existing Instance in a given project and location. 984 * </pre> 985 */ 986 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> updateInstance(com.google.cloud.memcache.v1.UpdateInstanceRequest request)987 updateInstance(com.google.cloud.memcache.v1.UpdateInstanceRequest request) { 988 return io.grpc.stub.ClientCalls.futureUnaryCall( 989 getChannel().newCall(getUpdateInstanceMethod(), getCallOptions()), request); 990 } 991 992 /** 993 * 994 * 995 * <pre> 996 * Updates the defined Memcached parameters for an existing instance. 997 * This method only stages the parameters, it must be followed by 998 * `ApplyParameters` to apply the parameters to nodes of the Memcached 999 * instance. 1000 * </pre> 1001 */ 1002 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> updateParameters(com.google.cloud.memcache.v1.UpdateParametersRequest request)1003 updateParameters(com.google.cloud.memcache.v1.UpdateParametersRequest request) { 1004 return io.grpc.stub.ClientCalls.futureUnaryCall( 1005 getChannel().newCall(getUpdateParametersMethod(), getCallOptions()), request); 1006 } 1007 1008 /** 1009 * 1010 * 1011 * <pre> 1012 * Deletes a single Instance. 1013 * </pre> 1014 */ 1015 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> deleteInstance(com.google.cloud.memcache.v1.DeleteInstanceRequest request)1016 deleteInstance(com.google.cloud.memcache.v1.DeleteInstanceRequest request) { 1017 return io.grpc.stub.ClientCalls.futureUnaryCall( 1018 getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), request); 1019 } 1020 1021 /** 1022 * 1023 * 1024 * <pre> 1025 * `ApplyParameters` restarts the set of specified nodes in order to update 1026 * them to the current set of parameters for the Memcached Instance. 1027 * </pre> 1028 */ 1029 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> applyParameters(com.google.cloud.memcache.v1.ApplyParametersRequest request)1030 applyParameters(com.google.cloud.memcache.v1.ApplyParametersRequest request) { 1031 return io.grpc.stub.ClientCalls.futureUnaryCall( 1032 getChannel().newCall(getApplyParametersMethod(), getCallOptions()), request); 1033 } 1034 1035 /** 1036 * 1037 * 1038 * <pre> 1039 * Reschedules upcoming maintenance event. 1040 * </pre> 1041 */ 1042 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> rescheduleMaintenance(com.google.cloud.memcache.v1.RescheduleMaintenanceRequest request)1043 rescheduleMaintenance(com.google.cloud.memcache.v1.RescheduleMaintenanceRequest request) { 1044 return io.grpc.stub.ClientCalls.futureUnaryCall( 1045 getChannel().newCall(getRescheduleMaintenanceMethod(), getCallOptions()), request); 1046 } 1047 } 1048 1049 private static final int METHODID_LIST_INSTANCES = 0; 1050 private static final int METHODID_GET_INSTANCE = 1; 1051 private static final int METHODID_CREATE_INSTANCE = 2; 1052 private static final int METHODID_UPDATE_INSTANCE = 3; 1053 private static final int METHODID_UPDATE_PARAMETERS = 4; 1054 private static final int METHODID_DELETE_INSTANCE = 5; 1055 private static final int METHODID_APPLY_PARAMETERS = 6; 1056 private static final int METHODID_RESCHEDULE_MAINTENANCE = 7; 1057 1058 private static final class MethodHandlers<Req, Resp> 1059 implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, 1060 io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>, 1061 io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>, 1062 io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> { 1063 private final AsyncService serviceImpl; 1064 private final int methodId; 1065 MethodHandlers(AsyncService serviceImpl, int methodId)1066 MethodHandlers(AsyncService serviceImpl, int methodId) { 1067 this.serviceImpl = serviceImpl; 1068 this.methodId = methodId; 1069 } 1070 1071 @java.lang.Override 1072 @java.lang.SuppressWarnings("unchecked") invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver)1073 public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) { 1074 switch (methodId) { 1075 case METHODID_LIST_INSTANCES: 1076 serviceImpl.listInstances( 1077 (com.google.cloud.memcache.v1.ListInstancesRequest) request, 1078 (io.grpc.stub.StreamObserver<com.google.cloud.memcache.v1.ListInstancesResponse>) 1079 responseObserver); 1080 break; 1081 case METHODID_GET_INSTANCE: 1082 serviceImpl.getInstance( 1083 (com.google.cloud.memcache.v1.GetInstanceRequest) request, 1084 (io.grpc.stub.StreamObserver<com.google.cloud.memcache.v1.Instance>) 1085 responseObserver); 1086 break; 1087 case METHODID_CREATE_INSTANCE: 1088 serviceImpl.createInstance( 1089 (com.google.cloud.memcache.v1.CreateInstanceRequest) request, 1090 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1091 break; 1092 case METHODID_UPDATE_INSTANCE: 1093 serviceImpl.updateInstance( 1094 (com.google.cloud.memcache.v1.UpdateInstanceRequest) request, 1095 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1096 break; 1097 case METHODID_UPDATE_PARAMETERS: 1098 serviceImpl.updateParameters( 1099 (com.google.cloud.memcache.v1.UpdateParametersRequest) request, 1100 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1101 break; 1102 case METHODID_DELETE_INSTANCE: 1103 serviceImpl.deleteInstance( 1104 (com.google.cloud.memcache.v1.DeleteInstanceRequest) request, 1105 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1106 break; 1107 case METHODID_APPLY_PARAMETERS: 1108 serviceImpl.applyParameters( 1109 (com.google.cloud.memcache.v1.ApplyParametersRequest) request, 1110 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1111 break; 1112 case METHODID_RESCHEDULE_MAINTENANCE: 1113 serviceImpl.rescheduleMaintenance( 1114 (com.google.cloud.memcache.v1.RescheduleMaintenanceRequest) request, 1115 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1116 break; 1117 default: 1118 throw new AssertionError(); 1119 } 1120 } 1121 1122 @java.lang.Override 1123 @java.lang.SuppressWarnings("unchecked") invoke( io.grpc.stub.StreamObserver<Resp> responseObserver)1124 public io.grpc.stub.StreamObserver<Req> invoke( 1125 io.grpc.stub.StreamObserver<Resp> responseObserver) { 1126 switch (methodId) { 1127 default: 1128 throw new AssertionError(); 1129 } 1130 } 1131 } 1132 bindService(AsyncService service)1133 public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { 1134 return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) 1135 .addMethod( 1136 getListInstancesMethod(), 1137 io.grpc.stub.ServerCalls.asyncUnaryCall( 1138 new MethodHandlers< 1139 com.google.cloud.memcache.v1.ListInstancesRequest, 1140 com.google.cloud.memcache.v1.ListInstancesResponse>( 1141 service, METHODID_LIST_INSTANCES))) 1142 .addMethod( 1143 getGetInstanceMethod(), 1144 io.grpc.stub.ServerCalls.asyncUnaryCall( 1145 new MethodHandlers< 1146 com.google.cloud.memcache.v1.GetInstanceRequest, 1147 com.google.cloud.memcache.v1.Instance>(service, METHODID_GET_INSTANCE))) 1148 .addMethod( 1149 getCreateInstanceMethod(), 1150 io.grpc.stub.ServerCalls.asyncUnaryCall( 1151 new MethodHandlers< 1152 com.google.cloud.memcache.v1.CreateInstanceRequest, 1153 com.google.longrunning.Operation>(service, METHODID_CREATE_INSTANCE))) 1154 .addMethod( 1155 getUpdateInstanceMethod(), 1156 io.grpc.stub.ServerCalls.asyncUnaryCall( 1157 new MethodHandlers< 1158 com.google.cloud.memcache.v1.UpdateInstanceRequest, 1159 com.google.longrunning.Operation>(service, METHODID_UPDATE_INSTANCE))) 1160 .addMethod( 1161 getUpdateParametersMethod(), 1162 io.grpc.stub.ServerCalls.asyncUnaryCall( 1163 new MethodHandlers< 1164 com.google.cloud.memcache.v1.UpdateParametersRequest, 1165 com.google.longrunning.Operation>(service, METHODID_UPDATE_PARAMETERS))) 1166 .addMethod( 1167 getDeleteInstanceMethod(), 1168 io.grpc.stub.ServerCalls.asyncUnaryCall( 1169 new MethodHandlers< 1170 com.google.cloud.memcache.v1.DeleteInstanceRequest, 1171 com.google.longrunning.Operation>(service, METHODID_DELETE_INSTANCE))) 1172 .addMethod( 1173 getApplyParametersMethod(), 1174 io.grpc.stub.ServerCalls.asyncUnaryCall( 1175 new MethodHandlers< 1176 com.google.cloud.memcache.v1.ApplyParametersRequest, 1177 com.google.longrunning.Operation>(service, METHODID_APPLY_PARAMETERS))) 1178 .addMethod( 1179 getRescheduleMaintenanceMethod(), 1180 io.grpc.stub.ServerCalls.asyncUnaryCall( 1181 new MethodHandlers< 1182 com.google.cloud.memcache.v1.RescheduleMaintenanceRequest, 1183 com.google.longrunning.Operation>(service, METHODID_RESCHEDULE_MAINTENANCE))) 1184 .build(); 1185 } 1186 1187 private abstract static class CloudMemcacheBaseDescriptorSupplier 1188 implements io.grpc.protobuf.ProtoFileDescriptorSupplier, 1189 io.grpc.protobuf.ProtoServiceDescriptorSupplier { CloudMemcacheBaseDescriptorSupplier()1190 CloudMemcacheBaseDescriptorSupplier() {} 1191 1192 @java.lang.Override getFileDescriptor()1193 public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { 1194 return com.google.cloud.memcache.v1.CloudMemcacheProto.getDescriptor(); 1195 } 1196 1197 @java.lang.Override getServiceDescriptor()1198 public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { 1199 return getFileDescriptor().findServiceByName("CloudMemcache"); 1200 } 1201 } 1202 1203 private static final class CloudMemcacheFileDescriptorSupplier 1204 extends CloudMemcacheBaseDescriptorSupplier { CloudMemcacheFileDescriptorSupplier()1205 CloudMemcacheFileDescriptorSupplier() {} 1206 } 1207 1208 private static final class CloudMemcacheMethodDescriptorSupplier 1209 extends CloudMemcacheBaseDescriptorSupplier 1210 implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { 1211 private final String methodName; 1212 CloudMemcacheMethodDescriptorSupplier(String methodName)1213 CloudMemcacheMethodDescriptorSupplier(String methodName) { 1214 this.methodName = methodName; 1215 } 1216 1217 @java.lang.Override getMethodDescriptor()1218 public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { 1219 return getServiceDescriptor().findMethodByName(methodName); 1220 } 1221 } 1222 1223 private static volatile io.grpc.ServiceDescriptor serviceDescriptor; 1224 getServiceDescriptor()1225 public static io.grpc.ServiceDescriptor getServiceDescriptor() { 1226 io.grpc.ServiceDescriptor result = serviceDescriptor; 1227 if (result == null) { 1228 synchronized (CloudMemcacheGrpc.class) { 1229 result = serviceDescriptor; 1230 if (result == null) { 1231 serviceDescriptor = 1232 result = 1233 io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) 1234 .setSchemaDescriptor(new CloudMemcacheFileDescriptorSupplier()) 1235 .addMethod(getListInstancesMethod()) 1236 .addMethod(getGetInstanceMethod()) 1237 .addMethod(getCreateInstanceMethod()) 1238 .addMethod(getUpdateInstanceMethod()) 1239 .addMethod(getUpdateParametersMethod()) 1240 .addMethod(getDeleteInstanceMethod()) 1241 .addMethod(getApplyParametersMethod()) 1242 .addMethod(getRescheduleMaintenanceMethod()) 1243 .build(); 1244 } 1245 } 1246 } 1247 return result; 1248 } 1249 } 1250