Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
* Manages long-running operations with an API service.
* When an API method normally takes long time to complete, it can be designed
* to return [Operation][google.longrunning.Operation] to the client, and the client can use this
* interface to receive the real response asynchronously by polling the
* operation resource, or pass the operation resource to another API (such as
* Google Cloud Pub/Sub API) to receive the response. Any API service that
* returns long-running operations should implement the `Operations` interface
* so developers can have a consistent client experience.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.2.0)",
comments = "Source: google/longrunning/operations.proto")
public final class OperationsGrpc {
private OperationsGrpc() {}
public static final String SERVICE_NAME = "google.longrunning.Operations";
// Static method descriptors that strictly reflect the proto.
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_LIST_OPERATIONS =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"google.longrunning.Operations", "ListOperations"),
io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.ListOperationsRequest.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.ListOperationsResponse.getDefaultInstance()));
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_GET_OPERATION =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"google.longrunning.Operations", "GetOperation"),
io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.GetOperationRequest.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.Operation.getDefaultInstance()));
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_DELETE_OPERATION =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"google.longrunning.Operations", "DeleteOperation"),
io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.DeleteOperationRequest.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.Empty.getDefaultInstance()));
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_CANCEL_OPERATION =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"google.longrunning.Operations", "CancelOperation"),
io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.CancelOperationRequest.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.Empty.getDefaultInstance()));
/**
* Creates a new async stub that supports all call types for the service
*/
public static OperationsStub newStub(io.grpc.Channel channel) {
return new OperationsStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static OperationsBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new OperationsBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service
*/
public static OperationsFutureStub newFutureStub(
io.grpc.Channel channel) {
return new OperationsFutureStub(channel);
}
/**
*
* Manages long-running operations with an API service.
* When an API method normally takes long time to complete, it can be designed
* to return [Operation][google.longrunning.Operation] to the client, and the client can use this
* interface to receive the real response asynchronously by polling the
* operation resource, or pass the operation resource to another API (such as
* Google Cloud Pub/Sub API) to receive the response. Any API service that
* returns long-running operations should implement the `Operations` interface
* so developers can have a consistent client experience.
*
*/
public static abstract class OperationsImplBase implements io.grpc.BindableService {
/**
*
* Lists operations that match the specified filter in the request. If the
* server doesn't support this method, it returns `UNIMPLEMENTED`.
* NOTE: the `name` binding below allows API services to override the binding
* to use different resource name schemes, such as `users/*/operations`.
*
* Gets the latest state of a long-running operation. Clients can use this
* method to poll the operation result at intervals as recommended by the API
* service.
*
* Deletes a long-running operation. This method indicates that the client is
* no longer interested in the operation result. It does not cancel the
* operation. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`.
*
* Starts asynchronous cancellation on a long-running operation. The server
* makes a best effort to cancel the operation, but success is not
* guaranteed. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use
* [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
* other methods to check whether the cancellation succeeded or whether the
* operation completed despite cancellation. On successful cancellation,
* the operation is not deleted; instead, it becomes an operation with
* an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
* corresponding to `Code.CANCELLED`.
*
*/
public void cancelOperation(com.google.longrunning.CancelOperationRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_CANCEL_OPERATION, responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
METHOD_LIST_OPERATIONS,
asyncUnaryCall(
new MethodHandlers<
com.google.longrunning.ListOperationsRequest,
com.google.longrunning.ListOperationsResponse>(
this, METHODID_LIST_OPERATIONS)))
.addMethod(
METHOD_GET_OPERATION,
asyncUnaryCall(
new MethodHandlers<
com.google.longrunning.GetOperationRequest,
com.google.longrunning.Operation>(
this, METHODID_GET_OPERATION)))
.addMethod(
METHOD_DELETE_OPERATION,
asyncUnaryCall(
new MethodHandlers<
com.google.longrunning.DeleteOperationRequest,
com.google.protobuf.Empty>(
this, METHODID_DELETE_OPERATION)))
.addMethod(
METHOD_CANCEL_OPERATION,
asyncUnaryCall(
new MethodHandlers<
com.google.longrunning.CancelOperationRequest,
com.google.protobuf.Empty>(
this, METHODID_CANCEL_OPERATION)))
.build();
}
}
/**
*
* Manages long-running operations with an API service.
* When an API method normally takes long time to complete, it can be designed
* to return [Operation][google.longrunning.Operation] to the client, and the client can use this
* interface to receive the real response asynchronously by polling the
* operation resource, or pass the operation resource to another API (such as
* Google Cloud Pub/Sub API) to receive the response. Any API service that
* returns long-running operations should implement the `Operations` interface
* so developers can have a consistent client experience.
*
*/
public static final class OperationsStub extends io.grpc.stub.AbstractStub {
private OperationsStub(io.grpc.Channel channel) {
super(channel);
}
private OperationsStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected OperationsStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new OperationsStub(channel, callOptions);
}
/**
*
* Lists operations that match the specified filter in the request. If the
* server doesn't support this method, it returns `UNIMPLEMENTED`.
* NOTE: the `name` binding below allows API services to override the binding
* to use different resource name schemes, such as `users/*/operations`.
*
* Gets the latest state of a long-running operation. Clients can use this
* method to poll the operation result at intervals as recommended by the API
* service.
*
* Deletes a long-running operation. This method indicates that the client is
* no longer interested in the operation result. It does not cancel the
* operation. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`.
*
* Starts asynchronous cancellation on a long-running operation. The server
* makes a best effort to cancel the operation, but success is not
* guaranteed. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use
* [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
* other methods to check whether the cancellation succeeded or whether the
* operation completed despite cancellation. On successful cancellation,
* the operation is not deleted; instead, it becomes an operation with
* an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
* corresponding to `Code.CANCELLED`.
*
* Manages long-running operations with an API service.
* When an API method normally takes long time to complete, it can be designed
* to return [Operation][google.longrunning.Operation] to the client, and the client can use this
* interface to receive the real response asynchronously by polling the
* operation resource, or pass the operation resource to another API (such as
* Google Cloud Pub/Sub API) to receive the response. Any API service that
* returns long-running operations should implement the `Operations` interface
* so developers can have a consistent client experience.
*
*/
public static final class OperationsBlockingStub extends io.grpc.stub.AbstractStub {
private OperationsBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private OperationsBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected OperationsBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new OperationsBlockingStub(channel, callOptions);
}
/**
*
* Lists operations that match the specified filter in the request. If the
* server doesn't support this method, it returns `UNIMPLEMENTED`.
* NOTE: the `name` binding below allows API services to override the binding
* to use different resource name schemes, such as `users/*/operations`.
*
* Gets the latest state of a long-running operation. Clients can use this
* method to poll the operation result at intervals as recommended by the API
* service.
*
* Deletes a long-running operation. This method indicates that the client is
* no longer interested in the operation result. It does not cancel the
* operation. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`.
*
* Starts asynchronous cancellation on a long-running operation. The server
* makes a best effort to cancel the operation, but success is not
* guaranteed. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use
* [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
* other methods to check whether the cancellation succeeded or whether the
* operation completed despite cancellation. On successful cancellation,
* the operation is not deleted; instead, it becomes an operation with
* an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
* corresponding to `Code.CANCELLED`.
*
* Manages long-running operations with an API service.
* When an API method normally takes long time to complete, it can be designed
* to return [Operation][google.longrunning.Operation] to the client, and the client can use this
* interface to receive the real response asynchronously by polling the
* operation resource, or pass the operation resource to another API (such as
* Google Cloud Pub/Sub API) to receive the response. Any API service that
* returns long-running operations should implement the `Operations` interface
* so developers can have a consistent client experience.
*
*/
public static final class OperationsFutureStub extends io.grpc.stub.AbstractStub {
private OperationsFutureStub(io.grpc.Channel channel) {
super(channel);
}
private OperationsFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected OperationsFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new OperationsFutureStub(channel, callOptions);
}
/**
*
* Lists operations that match the specified filter in the request. If the
* server doesn't support this method, it returns `UNIMPLEMENTED`.
* NOTE: the `name` binding below allows API services to override the binding
* to use different resource name schemes, such as `users/*/operations`.
*
* Gets the latest state of a long-running operation. Clients can use this
* method to poll the operation result at intervals as recommended by the API
* service.
*
* Deletes a long-running operation. This method indicates that the client is
* no longer interested in the operation result. It does not cancel the
* operation. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`.
*
* Starts asynchronous cancellation on a long-running operation. The server
* makes a best effort to cancel the operation, but success is not
* guaranteed. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use
* [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
* other methods to check whether the cancellation succeeded or whether the
* operation completed despite cancellation. On successful cancellation,
* the operation is not deleted; instead, it becomes an operation with
* an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
* corresponding to `Code.CANCELLED`.
*
*/
public com.google.common.util.concurrent.ListenableFuture cancelOperation(
com.google.longrunning.CancelOperationRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_CANCEL_OPERATION, getCallOptions()), request);
}
}
private static final int METHODID_LIST_OPERATIONS = 0;
private static final int METHODID_GET_OPERATION = 1;
private static final int METHODID_DELETE_OPERATION = 2;
private static final int METHODID_CANCEL_OPERATION = 3;
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 OperationsImplBase serviceImpl;
private final int methodId;
MethodHandlers(OperationsImplBase 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_OPERATIONS:
serviceImpl.listOperations((com.google.longrunning.ListOperationsRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_OPERATION:
serviceImpl.getOperation((com.google.longrunning.GetOperationRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_DELETE_OPERATION:
serviceImpl.deleteOperation((com.google.longrunning.DeleteOperationRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_CANCEL_OPERATION:
serviceImpl.cancelOperation((com.google.longrunning.CancelOperationRequest) 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();
}
}
}
private static final class OperationsDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier {
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.google.longrunning.OperationsProto.getDescriptor();
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (OperationsGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new OperationsDescriptorSupplier())
.addMethod(METHOD_LIST_OPERATIONS)
.addMethod(METHOD_GET_OPERATION)
.addMethod(METHOD_DELETE_OPERATION)
.addMethod(METHOD_CANCEL_OPERATION)
.build();
}
}
}
return result;
}
}