com.google.cloud.redis.v1.CloudRedisGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grpc-google-cloud-redis-v1 Show documentation
Show all versions of grpc-google-cloud-redis-v1 Show documentation
GRPC library for grpc-google-cloud-redis-v1
The newest version!
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.cloud.redis.v1;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
*
*
* Configures and manages Cloud Memorystore for Redis instances
* Google Cloud Memorystore for Redis v1
* The `redis.googleapis.com` service implements the Google Cloud Memorystore
* for Redis API and defines the following resource model for managing Redis
* instances:
* * The service works with a collection of cloud projects, named: `/projects/*`
* * Each project has a collection of available locations, named: `/locations/*`
* * Each location has a collection of Redis instances, named: `/instances/*`
* * As such, Redis instances are resources of the form:
* `/projects/{project_id}/locations/{location_id}/instances/{instance_id}`
* Note that location_id must be referring to a GCP `region`; for example:
* * `projects/redpepper-1290/locations/us-central1/instances/my-redis`
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: google/cloud/redis/v1/cloud_redis.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class CloudRedisGrpc {
private CloudRedisGrpc() {}
public static final java.lang.String SERVICE_NAME = "google.cloud.redis.v1.CloudRedis";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.ListInstancesRequest,
com.google.cloud.redis.v1.ListInstancesResponse>
getListInstancesMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ListInstances",
requestType = com.google.cloud.redis.v1.ListInstancesRequest.class,
responseType = com.google.cloud.redis.v1.ListInstancesResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.ListInstancesRequest,
com.google.cloud.redis.v1.ListInstancesResponse>
getListInstancesMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.ListInstancesRequest,
com.google.cloud.redis.v1.ListInstancesResponse>
getListInstancesMethod;
if ((getListInstancesMethod = CloudRedisGrpc.getListInstancesMethod) == null) {
synchronized (CloudRedisGrpc.class) {
if ((getListInstancesMethod = CloudRedisGrpc.getListInstancesMethod) == null) {
CloudRedisGrpc.getListInstancesMethod =
getListInstancesMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListInstances"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.redis.v1.ListInstancesRequest.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.redis.v1.ListInstancesResponse.getDefaultInstance()))
.setSchemaDescriptor(new CloudRedisMethodDescriptorSupplier("ListInstances"))
.build();
}
}
}
return getListInstancesMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.GetInstanceRequest, com.google.cloud.redis.v1.Instance>
getGetInstanceMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetInstance",
requestType = com.google.cloud.redis.v1.GetInstanceRequest.class,
responseType = com.google.cloud.redis.v1.Instance.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.GetInstanceRequest, com.google.cloud.redis.v1.Instance>
getGetInstanceMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.GetInstanceRequest, com.google.cloud.redis.v1.Instance>
getGetInstanceMethod;
if ((getGetInstanceMethod = CloudRedisGrpc.getGetInstanceMethod) == null) {
synchronized (CloudRedisGrpc.class) {
if ((getGetInstanceMethod = CloudRedisGrpc.getGetInstanceMethod) == null) {
CloudRedisGrpc.getGetInstanceMethod =
getGetInstanceMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstance"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.redis.v1.GetInstanceRequest.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.redis.v1.Instance.getDefaultInstance()))
.setSchemaDescriptor(new CloudRedisMethodDescriptorSupplier("GetInstance"))
.build();
}
}
}
return getGetInstanceMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.GetInstanceAuthStringRequest,
com.google.cloud.redis.v1.InstanceAuthString>
getGetInstanceAuthStringMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetInstanceAuthString",
requestType = com.google.cloud.redis.v1.GetInstanceAuthStringRequest.class,
responseType = com.google.cloud.redis.v1.InstanceAuthString.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.GetInstanceAuthStringRequest,
com.google.cloud.redis.v1.InstanceAuthString>
getGetInstanceAuthStringMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.GetInstanceAuthStringRequest,
com.google.cloud.redis.v1.InstanceAuthString>
getGetInstanceAuthStringMethod;
if ((getGetInstanceAuthStringMethod = CloudRedisGrpc.getGetInstanceAuthStringMethod) == null) {
synchronized (CloudRedisGrpc.class) {
if ((getGetInstanceAuthStringMethod = CloudRedisGrpc.getGetInstanceAuthStringMethod)
== null) {
CloudRedisGrpc.getGetInstanceAuthStringMethod =
getGetInstanceAuthStringMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(SERVICE_NAME, "GetInstanceAuthString"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.redis.v1.GetInstanceAuthStringRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.redis.v1.InstanceAuthString.getDefaultInstance()))
.setSchemaDescriptor(
new CloudRedisMethodDescriptorSupplier("GetInstanceAuthString"))
.build();
}
}
}
return getGetInstanceAuthStringMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.CreateInstanceRequest, com.google.longrunning.Operation>
getCreateInstanceMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CreateInstance",
requestType = com.google.cloud.redis.v1.CreateInstanceRequest.class,
responseType = com.google.longrunning.Operation.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.CreateInstanceRequest, com.google.longrunning.Operation>
getCreateInstanceMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.CreateInstanceRequest, com.google.longrunning.Operation>
getCreateInstanceMethod;
if ((getCreateInstanceMethod = CloudRedisGrpc.getCreateInstanceMethod) == null) {
synchronized (CloudRedisGrpc.class) {
if ((getCreateInstanceMethod = CloudRedisGrpc.getCreateInstanceMethod) == null) {
CloudRedisGrpc.getCreateInstanceMethod =
getCreateInstanceMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateInstance"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.redis.v1.CreateInstanceRequest.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(new CloudRedisMethodDescriptorSupplier("CreateInstance"))
.build();
}
}
}
return getCreateInstanceMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.UpdateInstanceRequest, com.google.longrunning.Operation>
getUpdateInstanceMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "UpdateInstance",
requestType = com.google.cloud.redis.v1.UpdateInstanceRequest.class,
responseType = com.google.longrunning.Operation.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.UpdateInstanceRequest, com.google.longrunning.Operation>
getUpdateInstanceMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.UpdateInstanceRequest, com.google.longrunning.Operation>
getUpdateInstanceMethod;
if ((getUpdateInstanceMethod = CloudRedisGrpc.getUpdateInstanceMethod) == null) {
synchronized (CloudRedisGrpc.class) {
if ((getUpdateInstanceMethod = CloudRedisGrpc.getUpdateInstanceMethod) == null) {
CloudRedisGrpc.getUpdateInstanceMethod =
getUpdateInstanceMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateInstance"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.redis.v1.UpdateInstanceRequest.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(new CloudRedisMethodDescriptorSupplier("UpdateInstance"))
.build();
}
}
}
return getUpdateInstanceMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.UpgradeInstanceRequest, com.google.longrunning.Operation>
getUpgradeInstanceMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "UpgradeInstance",
requestType = com.google.cloud.redis.v1.UpgradeInstanceRequest.class,
responseType = com.google.longrunning.Operation.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.UpgradeInstanceRequest, com.google.longrunning.Operation>
getUpgradeInstanceMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.UpgradeInstanceRequest, com.google.longrunning.Operation>
getUpgradeInstanceMethod;
if ((getUpgradeInstanceMethod = CloudRedisGrpc.getUpgradeInstanceMethod) == null) {
synchronized (CloudRedisGrpc.class) {
if ((getUpgradeInstanceMethod = CloudRedisGrpc.getUpgradeInstanceMethod) == null) {
CloudRedisGrpc.getUpgradeInstanceMethod =
getUpgradeInstanceMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpgradeInstance"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.redis.v1.UpgradeInstanceRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(
new CloudRedisMethodDescriptorSupplier("UpgradeInstance"))
.build();
}
}
}
return getUpgradeInstanceMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.ImportInstanceRequest, com.google.longrunning.Operation>
getImportInstanceMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ImportInstance",
requestType = com.google.cloud.redis.v1.ImportInstanceRequest.class,
responseType = com.google.longrunning.Operation.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.ImportInstanceRequest, com.google.longrunning.Operation>
getImportInstanceMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.ImportInstanceRequest, com.google.longrunning.Operation>
getImportInstanceMethod;
if ((getImportInstanceMethod = CloudRedisGrpc.getImportInstanceMethod) == null) {
synchronized (CloudRedisGrpc.class) {
if ((getImportInstanceMethod = CloudRedisGrpc.getImportInstanceMethod) == null) {
CloudRedisGrpc.getImportInstanceMethod =
getImportInstanceMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportInstance"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.redis.v1.ImportInstanceRequest.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(new CloudRedisMethodDescriptorSupplier("ImportInstance"))
.build();
}
}
}
return getImportInstanceMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.ExportInstanceRequest, com.google.longrunning.Operation>
getExportInstanceMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ExportInstance",
requestType = com.google.cloud.redis.v1.ExportInstanceRequest.class,
responseType = com.google.longrunning.Operation.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.ExportInstanceRequest, com.google.longrunning.Operation>
getExportInstanceMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.ExportInstanceRequest, com.google.longrunning.Operation>
getExportInstanceMethod;
if ((getExportInstanceMethod = CloudRedisGrpc.getExportInstanceMethod) == null) {
synchronized (CloudRedisGrpc.class) {
if ((getExportInstanceMethod = CloudRedisGrpc.getExportInstanceMethod) == null) {
CloudRedisGrpc.getExportInstanceMethod =
getExportInstanceMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportInstance"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.redis.v1.ExportInstanceRequest.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(new CloudRedisMethodDescriptorSupplier("ExportInstance"))
.build();
}
}
}
return getExportInstanceMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.FailoverInstanceRequest, com.google.longrunning.Operation>
getFailoverInstanceMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "FailoverInstance",
requestType = com.google.cloud.redis.v1.FailoverInstanceRequest.class,
responseType = com.google.longrunning.Operation.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.FailoverInstanceRequest, com.google.longrunning.Operation>
getFailoverInstanceMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.FailoverInstanceRequest, com.google.longrunning.Operation>
getFailoverInstanceMethod;
if ((getFailoverInstanceMethod = CloudRedisGrpc.getFailoverInstanceMethod) == null) {
synchronized (CloudRedisGrpc.class) {
if ((getFailoverInstanceMethod = CloudRedisGrpc.getFailoverInstanceMethod) == null) {
CloudRedisGrpc.getFailoverInstanceMethod =
getFailoverInstanceMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "FailoverInstance"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.redis.v1.FailoverInstanceRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(
new CloudRedisMethodDescriptorSupplier("FailoverInstance"))
.build();
}
}
}
return getFailoverInstanceMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.DeleteInstanceRequest, com.google.longrunning.Operation>
getDeleteInstanceMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "DeleteInstance",
requestType = com.google.cloud.redis.v1.DeleteInstanceRequest.class,
responseType = com.google.longrunning.Operation.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.DeleteInstanceRequest, com.google.longrunning.Operation>
getDeleteInstanceMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.DeleteInstanceRequest, com.google.longrunning.Operation>
getDeleteInstanceMethod;
if ((getDeleteInstanceMethod = CloudRedisGrpc.getDeleteInstanceMethod) == null) {
synchronized (CloudRedisGrpc.class) {
if ((getDeleteInstanceMethod = CloudRedisGrpc.getDeleteInstanceMethod) == null) {
CloudRedisGrpc.getDeleteInstanceMethod =
getDeleteInstanceMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteInstance"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.redis.v1.DeleteInstanceRequest.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(new CloudRedisMethodDescriptorSupplier("DeleteInstance"))
.build();
}
}
}
return getDeleteInstanceMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.RescheduleMaintenanceRequest, com.google.longrunning.Operation>
getRescheduleMaintenanceMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "RescheduleMaintenance",
requestType = com.google.cloud.redis.v1.RescheduleMaintenanceRequest.class,
responseType = com.google.longrunning.Operation.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.RescheduleMaintenanceRequest, com.google.longrunning.Operation>
getRescheduleMaintenanceMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.redis.v1.RescheduleMaintenanceRequest,
com.google.longrunning.Operation>
getRescheduleMaintenanceMethod;
if ((getRescheduleMaintenanceMethod = CloudRedisGrpc.getRescheduleMaintenanceMethod) == null) {
synchronized (CloudRedisGrpc.class) {
if ((getRescheduleMaintenanceMethod = CloudRedisGrpc.getRescheduleMaintenanceMethod)
== null) {
CloudRedisGrpc.getRescheduleMaintenanceMethod =
getRescheduleMaintenanceMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(SERVICE_NAME, "RescheduleMaintenance"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.redis.v1.RescheduleMaintenanceRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(
new CloudRedisMethodDescriptorSupplier("RescheduleMaintenance"))
.build();
}
}
}
return getRescheduleMaintenanceMethod;
}
/** Creates a new async stub that supports all call types for the service */
public static CloudRedisStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public CloudRedisStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new CloudRedisStub(channel, callOptions);
}
};
return CloudRedisStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static CloudRedisBlockingStub newBlockingStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public CloudRedisBlockingStub newStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new CloudRedisBlockingStub(channel, callOptions);
}
};
return CloudRedisBlockingStub.newStub(factory, channel);
}
/** Creates a new ListenableFuture-style stub that supports unary calls on the service */
public static CloudRedisFutureStub newFutureStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public CloudRedisFutureStub newStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new CloudRedisFutureStub(channel, callOptions);
}
};
return CloudRedisFutureStub.newStub(factory, channel);
}
/**
*
*
*
* Configures and manages Cloud Memorystore for Redis instances
* Google Cloud Memorystore for Redis v1
* The `redis.googleapis.com` service implements the Google Cloud Memorystore
* for Redis API and defines the following resource model for managing Redis
* instances:
* * The service works with a collection of cloud projects, named: `/projects/*`
* * Each project has a collection of available locations, named: `/locations/*`
* * Each location has a collection of Redis instances, named: `/instances/*`
* * As such, Redis instances are resources of the form:
* `/projects/{project_id}/locations/{location_id}/instances/{instance_id}`
* Note that location_id must be referring to a GCP `region`; for example:
* * `projects/redpepper-1290/locations/us-central1/instances/my-redis`
*
*/
public interface AsyncService {
/**
*
*
*
* Lists all Redis instances owned by a project in either the specified
* location (region) or all locations.
* The location should have the following format:
* * `projects/{project_id}/locations/{location_id}`
* If `location_id` is specified as `-` (wildcard), then all regions
* available to the project are queried, and the results are aggregated.
*
*/
default void listInstances(
com.google.cloud.redis.v1.ListInstancesRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getListInstancesMethod(), responseObserver);
}
/**
*
*
*
* Gets the details of a specific Redis instance.
*
*/
default void getInstance(
com.google.cloud.redis.v1.GetInstanceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getGetInstanceMethod(), responseObserver);
}
/**
*
*
*
* Gets the AUTH string for a Redis instance. If AUTH is not enabled for the
* instance the response will be empty. This information is not included in
* the details returned to GetInstance.
*
*/
default void getInstanceAuthString(
com.google.cloud.redis.v1.GetInstanceAuthStringRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getGetInstanceAuthStringMethod(), responseObserver);
}
/**
*
*
*
* Creates a Redis instance based on the specified tier and memory size.
* By default, the instance is accessible from the project's
* [default network](https://cloud.google.com/vpc/docs/vpc).
* The creation is executed asynchronously and callers may check the returned
* operation to track its progress. Once the operation is completed the Redis
* instance will be fully functional. Completed longrunning.Operation will
* contain the new instance object in the response field.
* The returned operation is automatically deleted after a few hours, so there
* is no need to call DeleteOperation.
*
*/
default void createInstance(
com.google.cloud.redis.v1.CreateInstanceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getCreateInstanceMethod(), responseObserver);
}
/**
*
*
*
* Updates the metadata and configuration of a specific Redis instance.
* Completed longrunning.Operation will contain the new instance object
* in the response field. The returned operation is automatically deleted
* after a few hours, so there is no need to call DeleteOperation.
*
*/
default void updateInstance(
com.google.cloud.redis.v1.UpdateInstanceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getUpdateInstanceMethod(), responseObserver);
}
/**
*
*
*
* Upgrades Redis instance to the newer Redis version specified in the
* request.
*
*/
default void upgradeInstance(
com.google.cloud.redis.v1.UpgradeInstanceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getUpgradeInstanceMethod(), responseObserver);
}
/**
*
*
*
* Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.
* Redis may stop serving during this operation. Instance state will be
* IMPORTING for entire operation. When complete, the instance will contain
* only data from the imported file.
* The returned operation is automatically deleted after a few hours, so
* there is no need to call DeleteOperation.
*
*/
default void importInstance(
com.google.cloud.redis.v1.ImportInstanceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getImportInstanceMethod(), responseObserver);
}
/**
*
*
*
* Export Redis instance data into a Redis RDB format file in Cloud Storage.
* Redis will continue serving during this operation.
* The returned operation is automatically deleted after a few hours, so
* there is no need to call DeleteOperation.
*
*/
default void exportInstance(
com.google.cloud.redis.v1.ExportInstanceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getExportInstanceMethod(), responseObserver);
}
/**
*
*
*
* Initiates a failover of the primary node to current replica node for a
* specific STANDARD tier Cloud Memorystore for Redis instance.
*
*/
default void failoverInstance(
com.google.cloud.redis.v1.FailoverInstanceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getFailoverInstanceMethod(), responseObserver);
}
/**
*
*
*
* Deletes a specific Redis instance. Instance stops serving and data is
* deleted.
*
*/
default void deleteInstance(
com.google.cloud.redis.v1.DeleteInstanceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getDeleteInstanceMethod(), responseObserver);
}
/**
*
*
*
* Reschedule maintenance for a given instance in a given project and
* location.
*
*/
default void rescheduleMaintenance(
com.google.cloud.redis.v1.RescheduleMaintenanceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getRescheduleMaintenanceMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service CloudRedis.
*
*
* Configures and manages Cloud Memorystore for Redis instances
* Google Cloud Memorystore for Redis v1
* The `redis.googleapis.com` service implements the Google Cloud Memorystore
* for Redis API and defines the following resource model for managing Redis
* instances:
* * The service works with a collection of cloud projects, named: `/projects/*`
* * Each project has a collection of available locations, named: `/locations/*`
* * Each location has a collection of Redis instances, named: `/instances/*`
* * As such, Redis instances are resources of the form:
* `/projects/{project_id}/locations/{location_id}/instances/{instance_id}`
* Note that location_id must be referring to a GCP `region`; for example:
* * `projects/redpepper-1290/locations/us-central1/instances/my-redis`
*
*/
public abstract static class CloudRedisImplBase implements io.grpc.BindableService, AsyncService {
@java.lang.Override
public final io.grpc.ServerServiceDefinition bindService() {
return CloudRedisGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service CloudRedis.
*
*
* Configures and manages Cloud Memorystore for Redis instances
* Google Cloud Memorystore for Redis v1
* The `redis.googleapis.com` service implements the Google Cloud Memorystore
* for Redis API and defines the following resource model for managing Redis
* instances:
* * The service works with a collection of cloud projects, named: `/projects/*`
* * Each project has a collection of available locations, named: `/locations/*`
* * Each location has a collection of Redis instances, named: `/instances/*`
* * As such, Redis instances are resources of the form:
* `/projects/{project_id}/locations/{location_id}/instances/{instance_id}`
* Note that location_id must be referring to a GCP `region`; for example:
* * `projects/redpepper-1290/locations/us-central1/instances/my-redis`
*
*/
public static final class CloudRedisStub extends io.grpc.stub.AbstractAsyncStub {
private CloudRedisStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected CloudRedisStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new CloudRedisStub(channel, callOptions);
}
/**
*
*
*
* Lists all Redis instances owned by a project in either the specified
* location (region) or all locations.
* The location should have the following format:
* * `projects/{project_id}/locations/{location_id}`
* If `location_id` is specified as `-` (wildcard), then all regions
* available to the project are queried, and the results are aggregated.
*
*/
public void listInstances(
com.google.cloud.redis.v1.ListInstancesRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getListInstancesMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Gets the details of a specific Redis instance.
*
*/
public void getInstance(
com.google.cloud.redis.v1.GetInstanceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetInstanceMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Gets the AUTH string for a Redis instance. If AUTH is not enabled for the
* instance the response will be empty. This information is not included in
* the details returned to GetInstance.
*
*/
public void getInstanceAuthString(
com.google.cloud.redis.v1.GetInstanceAuthStringRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetInstanceAuthStringMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Creates a Redis instance based on the specified tier and memory size.
* By default, the instance is accessible from the project's
* [default network](https://cloud.google.com/vpc/docs/vpc).
* The creation is executed asynchronously and callers may check the returned
* operation to track its progress. Once the operation is completed the Redis
* instance will be fully functional. Completed longrunning.Operation will
* contain the new instance object in the response field.
* The returned operation is automatically deleted after a few hours, so there
* is no need to call DeleteOperation.
*
*/
public void createInstance(
com.google.cloud.redis.v1.CreateInstanceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getCreateInstanceMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Updates the metadata and configuration of a specific Redis instance.
* Completed longrunning.Operation will contain the new instance object
* in the response field. The returned operation is automatically deleted
* after a few hours, so there is no need to call DeleteOperation.
*
*/
public void updateInstance(
com.google.cloud.redis.v1.UpdateInstanceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getUpdateInstanceMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Upgrades Redis instance to the newer Redis version specified in the
* request.
*
*/
public void upgradeInstance(
com.google.cloud.redis.v1.UpgradeInstanceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getUpgradeInstanceMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.
* Redis may stop serving during this operation. Instance state will be
* IMPORTING for entire operation. When complete, the instance will contain
* only data from the imported file.
* The returned operation is automatically deleted after a few hours, so
* there is no need to call DeleteOperation.
*
*/
public void importInstance(
com.google.cloud.redis.v1.ImportInstanceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getImportInstanceMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Export Redis instance data into a Redis RDB format file in Cloud Storage.
* Redis will continue serving during this operation.
* The returned operation is automatically deleted after a few hours, so
* there is no need to call DeleteOperation.
*
*/
public void exportInstance(
com.google.cloud.redis.v1.ExportInstanceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getExportInstanceMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Initiates a failover of the primary node to current replica node for a
* specific STANDARD tier Cloud Memorystore for Redis instance.
*
*/
public void failoverInstance(
com.google.cloud.redis.v1.FailoverInstanceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getFailoverInstanceMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Deletes a specific Redis instance. Instance stops serving and data is
* deleted.
*
*/
public void deleteInstance(
com.google.cloud.redis.v1.DeleteInstanceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Reschedule maintenance for a given instance in a given project and
* location.
*
*/
public void rescheduleMaintenance(
com.google.cloud.redis.v1.RescheduleMaintenanceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getRescheduleMaintenanceMethod(), getCallOptions()),
request,
responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service CloudRedis.
*
*
* Configures and manages Cloud Memorystore for Redis instances
* Google Cloud Memorystore for Redis v1
* The `redis.googleapis.com` service implements the Google Cloud Memorystore
* for Redis API and defines the following resource model for managing Redis
* instances:
* * The service works with a collection of cloud projects, named: `/projects/*`
* * Each project has a collection of available locations, named: `/locations/*`
* * Each location has a collection of Redis instances, named: `/instances/*`
* * As such, Redis instances are resources of the form:
* `/projects/{project_id}/locations/{location_id}/instances/{instance_id}`
* Note that location_id must be referring to a GCP `region`; for example:
* * `projects/redpepper-1290/locations/us-central1/instances/my-redis`
*
*/
public static final class CloudRedisBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private CloudRedisBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected CloudRedisBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new CloudRedisBlockingStub(channel, callOptions);
}
/**
*
*
*
* Lists all Redis instances owned by a project in either the specified
* location (region) or all locations.
* The location should have the following format:
* * `projects/{project_id}/locations/{location_id}`
* If `location_id` is specified as `-` (wildcard), then all regions
* available to the project are queried, and the results are aggregated.
*
*/
public com.google.cloud.redis.v1.ListInstancesResponse listInstances(
com.google.cloud.redis.v1.ListInstancesRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getListInstancesMethod(), getCallOptions(), request);
}
/**
*
*
*
* Gets the details of a specific Redis instance.
*
*/
public com.google.cloud.redis.v1.Instance getInstance(
com.google.cloud.redis.v1.GetInstanceRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetInstanceMethod(), getCallOptions(), request);
}
/**
*
*
*
* Gets the AUTH string for a Redis instance. If AUTH is not enabled for the
* instance the response will be empty. This information is not included in
* the details returned to GetInstance.
*
*/
public com.google.cloud.redis.v1.InstanceAuthString getInstanceAuthString(
com.google.cloud.redis.v1.GetInstanceAuthStringRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetInstanceAuthStringMethod(), getCallOptions(), request);
}
/**
*
*
*
* Creates a Redis instance based on the specified tier and memory size.
* By default, the instance is accessible from the project's
* [default network](https://cloud.google.com/vpc/docs/vpc).
* The creation is executed asynchronously and callers may check the returned
* operation to track its progress. Once the operation is completed the Redis
* instance will be fully functional. Completed longrunning.Operation will
* contain the new instance object in the response field.
* The returned operation is automatically deleted after a few hours, so there
* is no need to call DeleteOperation.
*
*/
public com.google.longrunning.Operation createInstance(
com.google.cloud.redis.v1.CreateInstanceRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getCreateInstanceMethod(), getCallOptions(), request);
}
/**
*
*
*
* Updates the metadata and configuration of a specific Redis instance.
* Completed longrunning.Operation will contain the new instance object
* in the response field. The returned operation is automatically deleted
* after a few hours, so there is no need to call DeleteOperation.
*
*/
public com.google.longrunning.Operation updateInstance(
com.google.cloud.redis.v1.UpdateInstanceRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getUpdateInstanceMethod(), getCallOptions(), request);
}
/**
*
*
*
* Upgrades Redis instance to the newer Redis version specified in the
* request.
*
*/
public com.google.longrunning.Operation upgradeInstance(
com.google.cloud.redis.v1.UpgradeInstanceRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getUpgradeInstanceMethod(), getCallOptions(), request);
}
/**
*
*
*
* Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.
* Redis may stop serving during this operation. Instance state will be
* IMPORTING for entire operation. When complete, the instance will contain
* only data from the imported file.
* The returned operation is automatically deleted after a few hours, so
* there is no need to call DeleteOperation.
*
*/
public com.google.longrunning.Operation importInstance(
com.google.cloud.redis.v1.ImportInstanceRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getImportInstanceMethod(), getCallOptions(), request);
}
/**
*
*
*
* Export Redis instance data into a Redis RDB format file in Cloud Storage.
* Redis will continue serving during this operation.
* The returned operation is automatically deleted after a few hours, so
* there is no need to call DeleteOperation.
*
*/
public com.google.longrunning.Operation exportInstance(
com.google.cloud.redis.v1.ExportInstanceRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getExportInstanceMethod(), getCallOptions(), request);
}
/**
*
*
*
* Initiates a failover of the primary node to current replica node for a
* specific STANDARD tier Cloud Memorystore for Redis instance.
*
*/
public com.google.longrunning.Operation failoverInstance(
com.google.cloud.redis.v1.FailoverInstanceRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getFailoverInstanceMethod(), getCallOptions(), request);
}
/**
*
*
*
* Deletes a specific Redis instance. Instance stops serving and data is
* deleted.
*
*/
public com.google.longrunning.Operation deleteInstance(
com.google.cloud.redis.v1.DeleteInstanceRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getDeleteInstanceMethod(), getCallOptions(), request);
}
/**
*
*
*
* Reschedule maintenance for a given instance in a given project and
* location.
*
*/
public com.google.longrunning.Operation rescheduleMaintenance(
com.google.cloud.redis.v1.RescheduleMaintenanceRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getRescheduleMaintenanceMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service CloudRedis.
*
*
* Configures and manages Cloud Memorystore for Redis instances
* Google Cloud Memorystore for Redis v1
* The `redis.googleapis.com` service implements the Google Cloud Memorystore
* for Redis API and defines the following resource model for managing Redis
* instances:
* * The service works with a collection of cloud projects, named: `/projects/*`
* * Each project has a collection of available locations, named: `/locations/*`
* * Each location has a collection of Redis instances, named: `/instances/*`
* * As such, Redis instances are resources of the form:
* `/projects/{project_id}/locations/{location_id}/instances/{instance_id}`
* Note that location_id must be referring to a GCP `region`; for example:
* * `projects/redpepper-1290/locations/us-central1/instances/my-redis`
*
*/
public static final class CloudRedisFutureStub
extends io.grpc.stub.AbstractFutureStub {
private CloudRedisFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected CloudRedisFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new CloudRedisFutureStub(channel, callOptions);
}
/**
*
*
*
* Lists all Redis instances owned by a project in either the specified
* location (region) or all locations.
* The location should have the following format:
* * `projects/{project_id}/locations/{location_id}`
* If `location_id` is specified as `-` (wildcard), then all regions
* available to the project are queried, and the results are aggregated.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.redis.v1.ListInstancesResponse>
listInstances(com.google.cloud.redis.v1.ListInstancesRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getListInstancesMethod(), getCallOptions()), request);
}
/**
*
*
*
* Gets the details of a specific Redis instance.
*
*/
public com.google.common.util.concurrent.ListenableFuture
getInstance(com.google.cloud.redis.v1.GetInstanceRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetInstanceMethod(), getCallOptions()), request);
}
/**
*
*
*
* Gets the AUTH string for a Redis instance. If AUTH is not enabled for the
* instance the response will be empty. This information is not included in
* the details returned to GetInstance.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.redis.v1.InstanceAuthString>
getInstanceAuthString(com.google.cloud.redis.v1.GetInstanceAuthStringRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetInstanceAuthStringMethod(), getCallOptions()), request);
}
/**
*
*
*
* Creates a Redis instance based on the specified tier and memory size.
* By default, the instance is accessible from the project's
* [default network](https://cloud.google.com/vpc/docs/vpc).
* The creation is executed asynchronously and callers may check the returned
* operation to track its progress. Once the operation is completed the Redis
* instance will be fully functional. Completed longrunning.Operation will
* contain the new instance object in the response field.
* The returned operation is automatically deleted after a few hours, so there
* is no need to call DeleteOperation.
*
*/
public com.google.common.util.concurrent.ListenableFuture
createInstance(com.google.cloud.redis.v1.CreateInstanceRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), request);
}
/**
*
*
*
* Updates the metadata and configuration of a specific Redis instance.
* Completed longrunning.Operation will contain the new instance object
* in the response field. The returned operation is automatically deleted
* after a few hours, so there is no need to call DeleteOperation.
*
*/
public com.google.common.util.concurrent.ListenableFuture
updateInstance(com.google.cloud.redis.v1.UpdateInstanceRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getUpdateInstanceMethod(), getCallOptions()), request);
}
/**
*
*
*
* Upgrades Redis instance to the newer Redis version specified in the
* request.
*
*/
public com.google.common.util.concurrent.ListenableFuture
upgradeInstance(com.google.cloud.redis.v1.UpgradeInstanceRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getUpgradeInstanceMethod(), getCallOptions()), request);
}
/**
*
*
*
* Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.
* Redis may stop serving during this operation. Instance state will be
* IMPORTING for entire operation. When complete, the instance will contain
* only data from the imported file.
* The returned operation is automatically deleted after a few hours, so
* there is no need to call DeleteOperation.
*
*/
public com.google.common.util.concurrent.ListenableFuture
importInstance(com.google.cloud.redis.v1.ImportInstanceRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getImportInstanceMethod(), getCallOptions()), request);
}
/**
*
*
*
* Export Redis instance data into a Redis RDB format file in Cloud Storage.
* Redis will continue serving during this operation.
* The returned operation is automatically deleted after a few hours, so
* there is no need to call DeleteOperation.
*
*/
public com.google.common.util.concurrent.ListenableFuture
exportInstance(com.google.cloud.redis.v1.ExportInstanceRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getExportInstanceMethod(), getCallOptions()), request);
}
/**
*
*
*
* Initiates a failover of the primary node to current replica node for a
* specific STANDARD tier Cloud Memorystore for Redis instance.
*
*/
public com.google.common.util.concurrent.ListenableFuture
failoverInstance(com.google.cloud.redis.v1.FailoverInstanceRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getFailoverInstanceMethod(), getCallOptions()), request);
}
/**
*
*
*
* Deletes a specific Redis instance. Instance stops serving and data is
* deleted.
*
*/
public com.google.common.util.concurrent.ListenableFuture
deleteInstance(com.google.cloud.redis.v1.DeleteInstanceRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), request);
}
/**
*
*
*
* Reschedule maintenance for a given instance in a given project and
* location.
*
*/
public com.google.common.util.concurrent.ListenableFuture
rescheduleMaintenance(com.google.cloud.redis.v1.RescheduleMaintenanceRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getRescheduleMaintenanceMethod(), getCallOptions()), request);
}
}
private static final int METHODID_LIST_INSTANCES = 0;
private static final int METHODID_GET_INSTANCE = 1;
private static final int METHODID_GET_INSTANCE_AUTH_STRING = 2;
private static final int METHODID_CREATE_INSTANCE = 3;
private static final int METHODID_UPDATE_INSTANCE = 4;
private static final int METHODID_UPGRADE_INSTANCE = 5;
private static final int METHODID_IMPORT_INSTANCE = 6;
private static final int METHODID_EXPORT_INSTANCE = 7;
private static final int METHODID_FAILOVER_INSTANCE = 8;
private static final int METHODID_DELETE_INSTANCE = 9;
private static final int METHODID_RESCHEDULE_MAINTENANCE = 10;
private static final class MethodHandlers
implements io.grpc.stub.ServerCalls.UnaryMethod,
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
private final AsyncService serviceImpl;
private final int methodId;
MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_LIST_INSTANCES:
serviceImpl.listInstances(
(com.google.cloud.redis.v1.ListInstancesRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_GET_INSTANCE:
serviceImpl.getInstance(
(com.google.cloud.redis.v1.GetInstanceRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_INSTANCE_AUTH_STRING:
serviceImpl.getInstanceAuthString(
(com.google.cloud.redis.v1.GetInstanceAuthStringRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_CREATE_INSTANCE:
serviceImpl.createInstance(
(com.google.cloud.redis.v1.CreateInstanceRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_UPDATE_INSTANCE:
serviceImpl.updateInstance(
(com.google.cloud.redis.v1.UpdateInstanceRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_UPGRADE_INSTANCE:
serviceImpl.upgradeInstance(
(com.google.cloud.redis.v1.UpgradeInstanceRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_IMPORT_INSTANCE:
serviceImpl.importInstance(
(com.google.cloud.redis.v1.ImportInstanceRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_EXPORT_INSTANCE:
serviceImpl.exportInstance(
(com.google.cloud.redis.v1.ExportInstanceRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_FAILOVER_INSTANCE:
serviceImpl.failoverInstance(
(com.google.cloud.redis.v1.FailoverInstanceRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_DELETE_INSTANCE:
serviceImpl.deleteInstance(
(com.google.cloud.redis.v1.DeleteInstanceRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_RESCHEDULE_MAINTENANCE:
serviceImpl.rescheduleMaintenance(
(com.google.cloud.redis.v1.RescheduleMaintenanceRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getListInstancesMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.redis.v1.ListInstancesRequest,
com.google.cloud.redis.v1.ListInstancesResponse>(
service, METHODID_LIST_INSTANCES)))
.addMethod(
getGetInstanceMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.redis.v1.GetInstanceRequest,
com.google.cloud.redis.v1.Instance>(service, METHODID_GET_INSTANCE)))
.addMethod(
getGetInstanceAuthStringMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.redis.v1.GetInstanceAuthStringRequest,
com.google.cloud.redis.v1.InstanceAuthString>(
service, METHODID_GET_INSTANCE_AUTH_STRING)))
.addMethod(
getCreateInstanceMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.redis.v1.CreateInstanceRequest,
com.google.longrunning.Operation>(service, METHODID_CREATE_INSTANCE)))
.addMethod(
getUpdateInstanceMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.redis.v1.UpdateInstanceRequest,
com.google.longrunning.Operation>(service, METHODID_UPDATE_INSTANCE)))
.addMethod(
getUpgradeInstanceMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.redis.v1.UpgradeInstanceRequest,
com.google.longrunning.Operation>(service, METHODID_UPGRADE_INSTANCE)))
.addMethod(
getImportInstanceMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.redis.v1.ImportInstanceRequest,
com.google.longrunning.Operation>(service, METHODID_IMPORT_INSTANCE)))
.addMethod(
getExportInstanceMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.redis.v1.ExportInstanceRequest,
com.google.longrunning.Operation>(service, METHODID_EXPORT_INSTANCE)))
.addMethod(
getFailoverInstanceMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.redis.v1.FailoverInstanceRequest,
com.google.longrunning.Operation>(service, METHODID_FAILOVER_INSTANCE)))
.addMethod(
getDeleteInstanceMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.redis.v1.DeleteInstanceRequest,
com.google.longrunning.Operation>(service, METHODID_DELETE_INSTANCE)))
.addMethod(
getRescheduleMaintenanceMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.redis.v1.RescheduleMaintenanceRequest,
com.google.longrunning.Operation>(service, METHODID_RESCHEDULE_MAINTENANCE)))
.build();
}
private abstract static class CloudRedisBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
io.grpc.protobuf.ProtoServiceDescriptorSupplier {
CloudRedisBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.google.cloud.redis.v1.CloudRedisServiceV1Proto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("CloudRedis");
}
}
private static final class CloudRedisFileDescriptorSupplier
extends CloudRedisBaseDescriptorSupplier {
CloudRedisFileDescriptorSupplier() {}
}
private static final class CloudRedisMethodDescriptorSupplier
extends CloudRedisBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
CloudRedisMethodDescriptorSupplier(java.lang.String methodName) {
this.methodName = methodName;
}
@java.lang.Override
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (CloudRedisGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor =
result =
io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new CloudRedisFileDescriptorSupplier())
.addMethod(getListInstancesMethod())
.addMethod(getGetInstanceMethod())
.addMethod(getGetInstanceAuthStringMethod())
.addMethod(getCreateInstanceMethod())
.addMethod(getUpdateInstanceMethod())
.addMethod(getUpgradeInstanceMethod())
.addMethod(getImportInstanceMethod())
.addMethod(getExportInstanceMethod())
.addMethod(getFailoverInstanceMethod())
.addMethod(getDeleteInstanceMethod())
.addMethod(getRescheduleMaintenanceMethod())
.build();
}
}
}
return result;
}
}