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

build.bazel.remote.execution.v2.ContentAddressableStorageClientStub.kt Maven / Gradle / Ivy

package build.bazel.remote.execution.v2

import com.google.common.util.concurrent.ListenableFuture
import io.grpc.CallOptions
import io.grpc.Channel
import io.grpc.MethodDescriptor
import io.grpc.MethodDescriptor.MethodType
import io.grpc.MethodDescriptor.generateFullMethodName
import io.grpc.Status.Code
import io.grpc.protobuf.ProtoUtils
import io.grpc.stub.AbstractStub
import io.grpc.stub.ClientCalls.asyncBidiStreamingCall
import io.grpc.stub.ClientCalls.asyncClientStreamingCall
import io.grpc.stub.ClientCalls.asyncServerStreamingCall
import io.grpc.stub.ClientCalls.futureUnaryCall
import io.grpc.stub.StreamObserver
import javax.annotation.Generated

@Generated("com.google.api.kotlin.generator.GRPCGenerator")
class ContentAddressableStorageClientStub(channel: Channel, callOptions: CallOptions =
        CallOptions.DEFAULT) : AbstractStub(channel,
        callOptions) {
    private val findMissingBlobsDescriptor: MethodDescriptor by lazy {
            MethodDescriptor.newBuilder()
                .setType(MethodDescriptor.MethodType.UNARY)
               
                    .setFullMethodName(generateFullMethodName("build.bazel.remote.execution.v2.ContentAddressableStorage",
                    "FindMissingBlobs"))
                .setSampledToLocalTracing(true)
                .setRequestMarshaller(ProtoUtils.marshaller(
                    FindMissingBlobsRequest.getDefaultInstance()))
                .setResponseMarshaller(ProtoUtils.marshaller(
                    FindMissingBlobsResponse.getDefaultInstance()))
                .build()

            }

    private val batchUpdateBlobsDescriptor: MethodDescriptor by lazy {
            MethodDescriptor.newBuilder()
                .setType(MethodDescriptor.MethodType.UNARY)
               
                    .setFullMethodName(generateFullMethodName("build.bazel.remote.execution.v2.ContentAddressableStorage",
                    "BatchUpdateBlobs"))
                .setSampledToLocalTracing(true)
                .setRequestMarshaller(ProtoUtils.marshaller(
                    BatchUpdateBlobsRequest.getDefaultInstance()))
                .setResponseMarshaller(ProtoUtils.marshaller(
                    BatchUpdateBlobsResponse.getDefaultInstance()))
                .build()

            }

    private val batchReadBlobsDescriptor: MethodDescriptor by lazy {
            MethodDescriptor.newBuilder()
                .setType(MethodDescriptor.MethodType.UNARY)
               
                    .setFullMethodName(generateFullMethodName("build.bazel.remote.execution.v2.ContentAddressableStorage",
                    "BatchReadBlobs"))
                .setSampledToLocalTracing(true)
                .setRequestMarshaller(ProtoUtils.marshaller(
                    BatchReadBlobsRequest.getDefaultInstance()))
                .setResponseMarshaller(ProtoUtils.marshaller(
                    BatchReadBlobsResponse.getDefaultInstance()))
                .build()

            }

    private val getTreeDescriptor: MethodDescriptor by lazy {
            MethodDescriptor.newBuilder()
                .setType(MethodDescriptor.MethodType.SERVER_STREAMING)
               
                    .setFullMethodName(generateFullMethodName("build.bazel.remote.execution.v2.ContentAddressableStorage",
                    "GetTree"))
                .setSampledToLocalTracing(true)
                .setRequestMarshaller(ProtoUtils.marshaller(
                    GetTreeRequest.getDefaultInstance()))
                .setResponseMarshaller(ProtoUtils.marshaller(
                    GetTreeResponse.getDefaultInstance()))
                .build()

            }

    override fun build(channel: Channel, callOptions: CallOptions):
            ContentAddressableStorageClientStub = ContentAddressableStorageClientStub(channel,
            callOptions)

    fun findMissingBlobs(request: FindMissingBlobsRequest):
            ListenableFuture = futureUnaryCall(
        channel.newCall(findMissingBlobsDescriptor, callOptions),
        request
    )


    fun batchUpdateBlobs(request: BatchUpdateBlobsRequest):
            ListenableFuture = futureUnaryCall(
        channel.newCall(batchUpdateBlobsDescriptor, callOptions),
        request
    )


    fun batchReadBlobs(request: BatchReadBlobsRequest): ListenableFuture =
            futureUnaryCall(
        channel.newCall(batchReadBlobsDescriptor, callOptions),
        request
    )


    fun getTree(request: GetTreeRequest, responseObserver: StreamObserver) =
            asyncServerStreamingCall(
        channel.newCall(getTreeDescriptor, callOptions),
        request,
        responseObserver
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy