Skip to content

Commit

Permalink
Regenerate redis client
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation committed Apr 5, 2019
1 parent 34d85db commit 6bedce4
Show file tree
Hide file tree
Showing 19 changed files with 2,316 additions and 326 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,60 @@ private CloudRedisGrpc() {}
return getUpdateInstanceMethod;
}

@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getFailoverInstanceMethod()} instead.
public static final io.grpc.MethodDescriptor<
com.google.cloud.redis.v1beta1.FailoverInstanceRequest, com.google.longrunning.Operation>
METHOD_FAILOVER_INSTANCE = getFailoverInstanceMethodHelper();

private static volatile io.grpc.MethodDescriptor<
com.google.cloud.redis.v1beta1.FailoverInstanceRequest, com.google.longrunning.Operation>
getFailoverInstanceMethod;

@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor<
com.google.cloud.redis.v1beta1.FailoverInstanceRequest, com.google.longrunning.Operation>
getFailoverInstanceMethod() {
return getFailoverInstanceMethodHelper();
}

private static io.grpc.MethodDescriptor<
com.google.cloud.redis.v1beta1.FailoverInstanceRequest, com.google.longrunning.Operation>
getFailoverInstanceMethodHelper() {
io.grpc.MethodDescriptor<
com.google.cloud.redis.v1beta1.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
.<com.google.cloud.redis.v1beta1.FailoverInstanceRequest,
com.google.longrunning.Operation>
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(
"google.cloud.redis.v1beta1.CloudRedis", "FailoverInstance"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.redis.v1beta1.FailoverInstanceRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(
new CloudRedisMethodDescriptorSupplier("FailoverInstance"))
.build();
}
}
}
return getFailoverInstanceMethod;
}

@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getDeleteInstanceMethod()} instead.
public static final io.grpc.MethodDescriptor<
Expand Down Expand Up @@ -380,7 +434,7 @@ public void getInstance(
*
* <pre>
* Creates a Redis instance based on the specified tier and memory size.
* By default, the instance is peered to the project's
* By default, the instance is accessible from the project's
* [default network](/compute/docs/networks-and-firewalls#networks).
* The creation is executed asynchronously and callers may check the returned
* operation to track its progress. Once the operation is completed the Redis
Expand Down Expand Up @@ -412,6 +466,20 @@ public void updateInstance(
asyncUnimplementedUnaryCall(getUpdateInstanceMethodHelper(), responseObserver);
}

/**
*
*
* <pre>
* Failover the master role to current replica node against a specific
* STANDARD tier redis instance.
* </pre>
*/
public void failoverInstance(
com.google.cloud.redis.v1beta1.FailoverInstanceRequest request,
io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {
asyncUnimplementedUnaryCall(getFailoverInstanceMethodHelper(), responseObserver);
}

/**
*
*
Expand Down Expand Up @@ -454,6 +522,12 @@ public final io.grpc.ServerServiceDefinition bindService() {
new MethodHandlers<
com.google.cloud.redis.v1beta1.UpdateInstanceRequest,
com.google.longrunning.Operation>(this, METHODID_UPDATE_INSTANCE)))
.addMethod(
getFailoverInstanceMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.cloud.redis.v1beta1.FailoverInstanceRequest,
com.google.longrunning.Operation>(this, METHODID_FAILOVER_INSTANCE)))
.addMethod(
getDeleteInstanceMethodHelper(),
asyncUnaryCall(
Expand Down Expand Up @@ -539,7 +613,7 @@ public void getInstance(
*
* <pre>
* Creates a Redis instance based on the specified tier and memory size.
* By default, the instance is peered to the project's
* By default, the instance is accessible from the project's
* [default network](/compute/docs/networks-and-firewalls#networks).
* The creation is executed asynchronously and callers may check the returned
* operation to track its progress. Once the operation is completed the Redis
Expand Down Expand Up @@ -577,6 +651,23 @@ public void updateInstance(
responseObserver);
}

/**
*
*
* <pre>
* Failover the master role to current replica node against a specific
* STANDARD tier redis instance.
* </pre>
*/
public void failoverInstance(
com.google.cloud.redis.v1beta1.FailoverInstanceRequest request,
io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getFailoverInstanceMethodHelper(), getCallOptions()),
request,
responseObserver);
}

/**
*
*
Expand Down Expand Up @@ -665,7 +756,7 @@ public com.google.cloud.redis.v1beta1.Instance getInstance(
*
* <pre>
* Creates a Redis instance based on the specified tier and memory size.
* By default, the instance is peered to the project's
* By default, the instance is accessible from the project's
* [default network](/compute/docs/networks-and-firewalls#networks).
* The creation is executed asynchronously and callers may check the returned
* operation to track its progress. Once the operation is completed the Redis
Expand Down Expand Up @@ -697,6 +788,20 @@ public com.google.longrunning.Operation updateInstance(
getChannel(), getUpdateInstanceMethodHelper(), getCallOptions(), request);
}

/**
*
*
* <pre>
* Failover the master role to current replica node against a specific
* STANDARD tier redis instance.
* </pre>
*/
public com.google.longrunning.Operation failoverInstance(
com.google.cloud.redis.v1beta1.FailoverInstanceRequest request) {
return blockingUnaryCall(
getChannel(), getFailoverInstanceMethodHelper(), getCallOptions(), request);
}

/**
*
*
Expand Down Expand Up @@ -783,7 +888,7 @@ protected CloudRedisFutureStub build(io.grpc.Channel channel, io.grpc.CallOption
*
* <pre>
* Creates a Redis instance based on the specified tier and memory size.
* By default, the instance is peered to the project's
* By default, the instance is accessible from the project's
* [default network](/compute/docs/networks-and-firewalls#networks).
* The creation is executed asynchronously and callers may check the returned
* operation to track its progress. Once the operation is completed the Redis
Expand Down Expand Up @@ -815,6 +920,20 @@ protected CloudRedisFutureStub build(io.grpc.Channel channel, io.grpc.CallOption
getChannel().newCall(getUpdateInstanceMethodHelper(), getCallOptions()), request);
}

/**
*
*
* <pre>
* Failover the master role to current replica node against a specific
* STANDARD tier redis instance.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation>
failoverInstance(com.google.cloud.redis.v1beta1.FailoverInstanceRequest request) {
return futureUnaryCall(
getChannel().newCall(getFailoverInstanceMethodHelper(), getCallOptions()), request);
}

/**
*
*
Expand All @@ -834,7 +953,8 @@ protected CloudRedisFutureStub build(io.grpc.Channel channel, io.grpc.CallOption
private static final int METHODID_GET_INSTANCE = 1;
private static final int METHODID_CREATE_INSTANCE = 2;
private static final int METHODID_UPDATE_INSTANCE = 3;
private static final int METHODID_DELETE_INSTANCE = 4;
private static final int METHODID_FAILOVER_INSTANCE = 4;
private static final int METHODID_DELETE_INSTANCE = 5;

private static final class MethodHandlers<Req, Resp>
implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
Expand Down Expand Up @@ -875,6 +995,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserv
(com.google.cloud.redis.v1beta1.UpdateInstanceRequest) request,
(io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver);
break;
case METHODID_FAILOVER_INSTANCE:
serviceImpl.failoverInstance(
(com.google.cloud.redis.v1beta1.FailoverInstanceRequest) request,
(io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver);
break;
case METHODID_DELETE_INSTANCE:
serviceImpl.deleteInstance(
(com.google.cloud.redis.v1beta1.DeleteInstanceRequest) request,
Expand Down Expand Up @@ -948,6 +1073,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
.addMethod(getGetInstanceMethodHelper())
.addMethod(getCreateInstanceMethodHelper())
.addMethod(getUpdateInstanceMethodHelper())
.addMethod(getFailoverInstanceMethodHelper())
.addMethod(getDeleteInstanceMethodHelper())
.build();
}
Expand Down
Loading

0 comments on commit 6bedce4

Please sign in to comment.