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

com.redhat.mercury.merchandisingloan.v10.api.bqfinancialinstrumentservice.MutinyBQFinancialInstrumentServiceGrpc Maven / Gradle / Ivy

The newest version!
package com.redhat.mercury.merchandisingloan.v10.api.bqfinancialinstrumentservice;

import static com.redhat.mercury.merchandisingloan.v10.api.bqfinancialinstrumentservice.BQFinancialInstrumentServiceGrpc.getServiceDescriptor;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;

@javax.annotation.Generated(
value = "by Mutiny Grpc generator",
comments = "Source: v10/api/bq_financial_instrument_service.proto")
public final class MutinyBQFinancialInstrumentServiceGrpc implements io.quarkus.grpc.runtime.MutinyGrpc {
    private MutinyBQFinancialInstrumentServiceGrpc() {}

    public static MutinyBQFinancialInstrumentServiceStub newMutinyStub(io.grpc.Channel channel) {
        return new MutinyBQFinancialInstrumentServiceStub(channel);
    }

    
    public static final class MutinyBQFinancialInstrumentServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.runtime.MutinyStub {
        private BQFinancialInstrumentServiceGrpc.BQFinancialInstrumentServiceStub delegateStub;

        private MutinyBQFinancialInstrumentServiceStub(io.grpc.Channel channel) {
            super(channel);
            delegateStub = BQFinancialInstrumentServiceGrpc.newStub(channel);
        }

        private MutinyBQFinancialInstrumentServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
            super(channel, callOptions);
            delegateStub = BQFinancialInstrumentServiceGrpc.newStub(channel).build(channel, callOptions);
        }

        @Override
        protected MutinyBQFinancialInstrumentServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
            return new MutinyBQFinancialInstrumentServiceStub(channel, callOptions);
        }

        
        public io.smallrye.mutiny.Uni initiateFinancialInstrument(com.redhat.mercury.merchandisingloan.v10.api.bqfinancialinstrumentservice.BqFinancialInstrumentService.InitiateFinancialInstrumentRequest request) {
            return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::initiateFinancialInstrument);
        }

        
        public io.smallrye.mutiny.Uni retrieveFinancialInstrument(com.redhat.mercury.merchandisingloan.v10.api.bqfinancialinstrumentservice.BqFinancialInstrumentService.RetrieveFinancialInstrumentRequest request) {
            return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::retrieveFinancialInstrument);
        }

        
        public io.smallrye.mutiny.Uni updateFinancialInstrument(com.redhat.mercury.merchandisingloan.v10.api.bqfinancialinstrumentservice.BqFinancialInstrumentService.UpdateFinancialInstrumentRequest request) {
            return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::updateFinancialInstrument);
        }

    }

    
    public static abstract class BQFinancialInstrumentServiceImplBase implements io.grpc.BindableService {

        private String compression;
        /**
        * Set whether the server will try to use a compressed response.
        *
        * @param compression the compression, e.g {@code gzip}
        */
        public BQFinancialInstrumentServiceImplBase withCompression(String compression) {
        this.compression = compression;
        return this;
        }


        
        public io.smallrye.mutiny.Uni initiateFinancialInstrument(com.redhat.mercury.merchandisingloan.v10.api.bqfinancialinstrumentservice.BqFinancialInstrumentService.InitiateFinancialInstrumentRequest request) {
            throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
        }

        
        public io.smallrye.mutiny.Uni retrieveFinancialInstrument(com.redhat.mercury.merchandisingloan.v10.api.bqfinancialinstrumentservice.BqFinancialInstrumentService.RetrieveFinancialInstrumentRequest request) {
            throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
        }

        
        public io.smallrye.mutiny.Uni updateFinancialInstrument(com.redhat.mercury.merchandisingloan.v10.api.bqfinancialinstrumentservice.BqFinancialInstrumentService.UpdateFinancialInstrumentRequest request) {
            throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
        }

        @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
            return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
                    .addMethod(
                            com.redhat.mercury.merchandisingloan.v10.api.bqfinancialinstrumentservice.BQFinancialInstrumentServiceGrpc.getInitiateFinancialInstrumentMethod(),
                            asyncUnaryCall(
                                    new MethodHandlers<
                                            com.redhat.mercury.merchandisingloan.v10.api.bqfinancialinstrumentservice.BqFinancialInstrumentService.InitiateFinancialInstrumentRequest,
                                            com.redhat.mercury.merchandisingloan.v10.InitiateFinancialInstrumentResponseOuterClass.InitiateFinancialInstrumentResponse>(
                                            this, METHODID_INITIATE_FINANCIAL_INSTRUMENT, compression)))
                    .addMethod(
                            com.redhat.mercury.merchandisingloan.v10.api.bqfinancialinstrumentservice.BQFinancialInstrumentServiceGrpc.getRetrieveFinancialInstrumentMethod(),
                            asyncUnaryCall(
                                    new MethodHandlers<
                                            com.redhat.mercury.merchandisingloan.v10.api.bqfinancialinstrumentservice.BqFinancialInstrumentService.RetrieveFinancialInstrumentRequest,
                                            com.redhat.mercury.merchandisingloan.v10.RetrieveFinancialInstrumentResponseOuterClass.RetrieveFinancialInstrumentResponse>(
                                            this, METHODID_RETRIEVE_FINANCIAL_INSTRUMENT, compression)))
                    .addMethod(
                            com.redhat.mercury.merchandisingloan.v10.api.bqfinancialinstrumentservice.BQFinancialInstrumentServiceGrpc.getUpdateFinancialInstrumentMethod(),
                            asyncUnaryCall(
                                    new MethodHandlers<
                                            com.redhat.mercury.merchandisingloan.v10.api.bqfinancialinstrumentservice.BqFinancialInstrumentService.UpdateFinancialInstrumentRequest,
                                            com.redhat.mercury.merchandisingloan.v10.UpdateFinancialInstrumentResponseOuterClass.UpdateFinancialInstrumentResponse>(
                                            this, METHODID_UPDATE_FINANCIAL_INSTRUMENT, compression)))
                    .build();
        }
    }

    private static final int METHODID_INITIATE_FINANCIAL_INSTRUMENT = 0;
    private static final int METHODID_RETRIEVE_FINANCIAL_INSTRUMENT = 1;
    private static final int METHODID_UPDATE_FINANCIAL_INSTRUMENT = 2;

    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 BQFinancialInstrumentServiceImplBase serviceImpl;
        private final int methodId;
        private final String compression;

        MethodHandlers(BQFinancialInstrumentServiceImplBase serviceImpl, int methodId, String compression) {
            this.serviceImpl = serviceImpl;
            this.methodId = methodId;
            this.compression = compression;
        }

        @java.lang.Override
        @java.lang.SuppressWarnings("unchecked")
        public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
            switch (methodId) {
                case METHODID_INITIATE_FINANCIAL_INSTRUMENT:
                    io.quarkus.grpc.runtime.ServerCalls.oneToOne((com.redhat.mercury.merchandisingloan.v10.api.bqfinancialinstrumentservice.BqFinancialInstrumentService.InitiateFinancialInstrumentRequest) request,
                            (io.grpc.stub.StreamObserver) responseObserver,
                            compression,
                            serviceImpl::initiateFinancialInstrument);
                    break;
                case METHODID_RETRIEVE_FINANCIAL_INSTRUMENT:
                    io.quarkus.grpc.runtime.ServerCalls.oneToOne((com.redhat.mercury.merchandisingloan.v10.api.bqfinancialinstrumentservice.BqFinancialInstrumentService.RetrieveFinancialInstrumentRequest) request,
                            (io.grpc.stub.StreamObserver) responseObserver,
                            compression,
                            serviceImpl::retrieveFinancialInstrument);
                    break;
                case METHODID_UPDATE_FINANCIAL_INSTRUMENT:
                    io.quarkus.grpc.runtime.ServerCalls.oneToOne((com.redhat.mercury.merchandisingloan.v10.api.bqfinancialinstrumentservice.BqFinancialInstrumentService.UpdateFinancialInstrumentRequest) request,
                            (io.grpc.stub.StreamObserver) responseObserver,
                            compression,
                            serviceImpl::updateFinancialInstrument);
                    break;
                default:
                    throw new java.lang.AssertionError();
            }
        }

        @java.lang.Override
        @java.lang.SuppressWarnings("unchecked")
        public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) {
            switch (methodId) {
                default:
                    throw new java.lang.AssertionError();
            }
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy