All Downloads are FREE. Search and download functionalities are using the official Maven repository.

build.bazel.remote.asset.v1.PushGrpc Maven / Gradle / Ivy

package build.bazel.remote.asset.v1;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 * The Push service is complementary to the Fetch, and allows for
 * associating contents of URLs to be returned in future Fetch API calls.
 * As with other services in the Remote Execution API, any call may return an
 * error with a [RetryInfo][google.rpc.RetryInfo] error detail providing
 * information about when the client should retry the request; clients SHOULD
 * respect the information provided.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.65.0)", comments = "Source: build/bazel/remote/asset/v1/remote_asset.proto") @io.grpc.stub.annotations.GrpcGenerated public final class PushGrpc { private PushGrpc() {} public static final java.lang.String SERVICE_NAME = "build.bazel.remote.asset.v1.Push"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getPushBlobMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "PushBlob", requestType = build.bazel.remote.asset.v1.PushBlobRequest.class, responseType = build.bazel.remote.asset.v1.PushBlobResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getPushBlobMethod() { io.grpc.MethodDescriptor getPushBlobMethod; if ((getPushBlobMethod = PushGrpc.getPushBlobMethod) == null) { synchronized (PushGrpc.class) { if ((getPushBlobMethod = PushGrpc.getPushBlobMethod) == null) { PushGrpc.getPushBlobMethod = getPushBlobMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PushBlob")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( build.bazel.remote.asset.v1.PushBlobRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( build.bazel.remote.asset.v1.PushBlobResponse.getDefaultInstance())) .setSchemaDescriptor(new PushMethodDescriptorSupplier("PushBlob")) .build(); } } } return getPushBlobMethod; } private static volatile io.grpc.MethodDescriptor getPushDirectoryMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "PushDirectory", requestType = build.bazel.remote.asset.v1.PushDirectoryRequest.class, responseType = build.bazel.remote.asset.v1.PushDirectoryResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getPushDirectoryMethod() { io.grpc.MethodDescriptor getPushDirectoryMethod; if ((getPushDirectoryMethod = PushGrpc.getPushDirectoryMethod) == null) { synchronized (PushGrpc.class) { if ((getPushDirectoryMethod = PushGrpc.getPushDirectoryMethod) == null) { PushGrpc.getPushDirectoryMethod = getPushDirectoryMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PushDirectory")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( build.bazel.remote.asset.v1.PushDirectoryRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( build.bazel.remote.asset.v1.PushDirectoryResponse.getDefaultInstance())) .setSchemaDescriptor(new PushMethodDescriptorSupplier("PushDirectory")) .build(); } } } return getPushDirectoryMethod; } /** * Creates a new async stub that supports all call types for the service */ public static PushStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public PushStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PushStub(channel, callOptions); } }; return PushStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static PushBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public PushBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PushBlockingStub(channel, callOptions); } }; return PushBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static PushFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public PushFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PushFutureStub(channel, callOptions); } }; return PushFutureStub.newStub(factory, channel); } /** *
   * The Push service is complementary to the Fetch, and allows for
   * associating contents of URLs to be returned in future Fetch API calls.
   * As with other services in the Remote Execution API, any call may return an
   * error with a [RetryInfo][google.rpc.RetryInfo] error detail providing
   * information about when the client should retry the request; clients SHOULD
   * respect the information provided.
   * 
*/ public interface AsyncService { /** *
     * These APIs associate the identifying information of a resource, as
     * indicated by URI and optionally Qualifiers, with content available in the
     * CAS. For example, associating a repository url and a commit id with a
     * Directory Digest.
     * Servers *SHOULD* only allow trusted clients to associate content, and *MAY*
     * only allow certain URIs to be pushed.
     * Clients *MUST* ensure associated content is available in CAS prior to
     * pushing.
     * Clients *MUST* ensure the Qualifiers listed correctly match the contents,
     * and Servers *MAY* trust these values without validation.
     * Fetch servers *MAY* require exact match of all qualifiers when returning
     * content previously pushed, or allow fetching content with only a subset of
     * the qualifiers specified on Push.
     * Clients can specify expiration information that the server *SHOULD*
     * respect. Subsequent requests can be used to alter the expiration time.
     * A minimal compliant Fetch implementation may support only Push'd content
     * and return `NOT_FOUND` for any resource that was not pushed first.
     * Alternatively, a compliant implementation may choose to not support Push
     * and only return resources that can be Fetch'd from origin.
     * Errors will be returned as gRPC Status errors.
     * The possible RPC errors include:
     * * `INVALID_ARGUMENT`: One or more arguments to the RPC were invalid.
     * * `RESOURCE_EXHAUSTED`: There is insufficient quota of some resource to
     *   perform the requested operation. The client may retry after a delay.
     * * `UNAVAILABLE`: Due to a transient condition the operation could not be
     *   completed. The client should retry.
     * * `INTERNAL`: An internal error occurred while performing the operation.
     *   The client should retry.
     * 
*/ default void pushBlob(build.bazel.remote.asset.v1.PushBlobRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPushBlobMethod(), responseObserver); } /** */ default void pushDirectory(build.bazel.remote.asset.v1.PushDirectoryRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPushDirectoryMethod(), responseObserver); } } /** * Base class for the server implementation of the service Push. *
   * The Push service is complementary to the Fetch, and allows for
   * associating contents of URLs to be returned in future Fetch API calls.
   * As with other services in the Remote Execution API, any call may return an
   * error with a [RetryInfo][google.rpc.RetryInfo] error detail providing
   * information about when the client should retry the request; clients SHOULD
   * respect the information provided.
   * 
*/ public static abstract class PushImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return PushGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service Push. *
   * The Push service is complementary to the Fetch, and allows for
   * associating contents of URLs to be returned in future Fetch API calls.
   * As with other services in the Remote Execution API, any call may return an
   * error with a [RetryInfo][google.rpc.RetryInfo] error detail providing
   * information about when the client should retry the request; clients SHOULD
   * respect the information provided.
   * 
*/ public static final class PushStub extends io.grpc.stub.AbstractAsyncStub { private PushStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected PushStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PushStub(channel, callOptions); } /** *
     * These APIs associate the identifying information of a resource, as
     * indicated by URI and optionally Qualifiers, with content available in the
     * CAS. For example, associating a repository url and a commit id with a
     * Directory Digest.
     * Servers *SHOULD* only allow trusted clients to associate content, and *MAY*
     * only allow certain URIs to be pushed.
     * Clients *MUST* ensure associated content is available in CAS prior to
     * pushing.
     * Clients *MUST* ensure the Qualifiers listed correctly match the contents,
     * and Servers *MAY* trust these values without validation.
     * Fetch servers *MAY* require exact match of all qualifiers when returning
     * content previously pushed, or allow fetching content with only a subset of
     * the qualifiers specified on Push.
     * Clients can specify expiration information that the server *SHOULD*
     * respect. Subsequent requests can be used to alter the expiration time.
     * A minimal compliant Fetch implementation may support only Push'd content
     * and return `NOT_FOUND` for any resource that was not pushed first.
     * Alternatively, a compliant implementation may choose to not support Push
     * and only return resources that can be Fetch'd from origin.
     * Errors will be returned as gRPC Status errors.
     * The possible RPC errors include:
     * * `INVALID_ARGUMENT`: One or more arguments to the RPC were invalid.
     * * `RESOURCE_EXHAUSTED`: There is insufficient quota of some resource to
     *   perform the requested operation. The client may retry after a delay.
     * * `UNAVAILABLE`: Due to a transient condition the operation could not be
     *   completed. The client should retry.
     * * `INTERNAL`: An internal error occurred while performing the operation.
     *   The client should retry.
     * 
*/ public void pushBlob(build.bazel.remote.asset.v1.PushBlobRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getPushBlobMethod(), getCallOptions()), request, responseObserver); } /** */ public void pushDirectory(build.bazel.remote.asset.v1.PushDirectoryRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getPushDirectoryMethod(), getCallOptions()), request, responseObserver); } } /** * A stub to allow clients to do synchronous rpc calls to service Push. *
   * The Push service is complementary to the Fetch, and allows for
   * associating contents of URLs to be returned in future Fetch API calls.
   * As with other services in the Remote Execution API, any call may return an
   * error with a [RetryInfo][google.rpc.RetryInfo] error detail providing
   * information about when the client should retry the request; clients SHOULD
   * respect the information provided.
   * 
*/ public static final class PushBlockingStub extends io.grpc.stub.AbstractBlockingStub { private PushBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected PushBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PushBlockingStub(channel, callOptions); } /** *
     * These APIs associate the identifying information of a resource, as
     * indicated by URI and optionally Qualifiers, with content available in the
     * CAS. For example, associating a repository url and a commit id with a
     * Directory Digest.
     * Servers *SHOULD* only allow trusted clients to associate content, and *MAY*
     * only allow certain URIs to be pushed.
     * Clients *MUST* ensure associated content is available in CAS prior to
     * pushing.
     * Clients *MUST* ensure the Qualifiers listed correctly match the contents,
     * and Servers *MAY* trust these values without validation.
     * Fetch servers *MAY* require exact match of all qualifiers when returning
     * content previously pushed, or allow fetching content with only a subset of
     * the qualifiers specified on Push.
     * Clients can specify expiration information that the server *SHOULD*
     * respect. Subsequent requests can be used to alter the expiration time.
     * A minimal compliant Fetch implementation may support only Push'd content
     * and return `NOT_FOUND` for any resource that was not pushed first.
     * Alternatively, a compliant implementation may choose to not support Push
     * and only return resources that can be Fetch'd from origin.
     * Errors will be returned as gRPC Status errors.
     * The possible RPC errors include:
     * * `INVALID_ARGUMENT`: One or more arguments to the RPC were invalid.
     * * `RESOURCE_EXHAUSTED`: There is insufficient quota of some resource to
     *   perform the requested operation. The client may retry after a delay.
     * * `UNAVAILABLE`: Due to a transient condition the operation could not be
     *   completed. The client should retry.
     * * `INTERNAL`: An internal error occurred while performing the operation.
     *   The client should retry.
     * 
*/ public build.bazel.remote.asset.v1.PushBlobResponse pushBlob(build.bazel.remote.asset.v1.PushBlobRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getPushBlobMethod(), getCallOptions(), request); } /** */ public build.bazel.remote.asset.v1.PushDirectoryResponse pushDirectory(build.bazel.remote.asset.v1.PushDirectoryRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getPushDirectoryMethod(), getCallOptions(), request); } } /** * A stub to allow clients to do ListenableFuture-style rpc calls to service Push. *
   * The Push service is complementary to the Fetch, and allows for
   * associating contents of URLs to be returned in future Fetch API calls.
   * As with other services in the Remote Execution API, any call may return an
   * error with a [RetryInfo][google.rpc.RetryInfo] error detail providing
   * information about when the client should retry the request; clients SHOULD
   * respect the information provided.
   * 
*/ public static final class PushFutureStub extends io.grpc.stub.AbstractFutureStub { private PushFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected PushFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PushFutureStub(channel, callOptions); } /** *
     * These APIs associate the identifying information of a resource, as
     * indicated by URI and optionally Qualifiers, with content available in the
     * CAS. For example, associating a repository url and a commit id with a
     * Directory Digest.
     * Servers *SHOULD* only allow trusted clients to associate content, and *MAY*
     * only allow certain URIs to be pushed.
     * Clients *MUST* ensure associated content is available in CAS prior to
     * pushing.
     * Clients *MUST* ensure the Qualifiers listed correctly match the contents,
     * and Servers *MAY* trust these values without validation.
     * Fetch servers *MAY* require exact match of all qualifiers when returning
     * content previously pushed, or allow fetching content with only a subset of
     * the qualifiers specified on Push.
     * Clients can specify expiration information that the server *SHOULD*
     * respect. Subsequent requests can be used to alter the expiration time.
     * A minimal compliant Fetch implementation may support only Push'd content
     * and return `NOT_FOUND` for any resource that was not pushed first.
     * Alternatively, a compliant implementation may choose to not support Push
     * and only return resources that can be Fetch'd from origin.
     * Errors will be returned as gRPC Status errors.
     * The possible RPC errors include:
     * * `INVALID_ARGUMENT`: One or more arguments to the RPC were invalid.
     * * `RESOURCE_EXHAUSTED`: There is insufficient quota of some resource to
     *   perform the requested operation. The client may retry after a delay.
     * * `UNAVAILABLE`: Due to a transient condition the operation could not be
     *   completed. The client should retry.
     * * `INTERNAL`: An internal error occurred while performing the operation.
     *   The client should retry.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture pushBlob( build.bazel.remote.asset.v1.PushBlobRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getPushBlobMethod(), getCallOptions()), request); } /** */ public com.google.common.util.concurrent.ListenableFuture pushDirectory( build.bazel.remote.asset.v1.PushDirectoryRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getPushDirectoryMethod(), getCallOptions()), request); } } private static final int METHODID_PUSH_BLOB = 0; private static final int METHODID_PUSH_DIRECTORY = 1; 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_PUSH_BLOB: serviceImpl.pushBlob((build.bazel.remote.asset.v1.PushBlobRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_PUSH_DIRECTORY: serviceImpl.pushDirectory((build.bazel.remote.asset.v1.PushDirectoryRequest) 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( getPushBlobMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< build.bazel.remote.asset.v1.PushBlobRequest, build.bazel.remote.asset.v1.PushBlobResponse>( service, METHODID_PUSH_BLOB))) .addMethod( getPushDirectoryMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< build.bazel.remote.asset.v1.PushDirectoryRequest, build.bazel.remote.asset.v1.PushDirectoryResponse>( service, METHODID_PUSH_DIRECTORY))) .build(); } private static abstract class PushBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { PushBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return build.bazel.remote.asset.v1.RemoteAssetProto.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("Push"); } } private static final class PushFileDescriptorSupplier extends PushBaseDescriptorSupplier { PushFileDescriptorSupplier() {} } private static final class PushMethodDescriptorSupplier extends PushBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final java.lang.String methodName; PushMethodDescriptorSupplier(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 (PushGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new PushFileDescriptorSupplier()) .addMethod(getPushBlobMethod()) .addMethod(getPushDirectoryMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy