1// Generated GRPC code for FlatBuffers TS *** DO NOT EDIT *** 2import * as flatbuffers from 'flatbuffers'; 3import { HelloReply as models_HelloReply } from './models/hello-reply'; 4import { HelloRequest as models_HelloRequest } from './models/hello-request'; 5 6var grpc = require('grpc'); 7 8function serialize_models_HelloReply(buffer_args) { 9 if (!(buffer_args instanceof models_HelloReply)) { 10 throw new Error('Expected argument of type HelloReply'); 11 } 12 return buffer_args.serialize(); 13} 14 15function deserialize_models_HelloReply(buffer) { 16 return models_HelloReply.getRootAsHelloReply(new flatbuffers.ByteBuffer(buffer)) 17} 18 19 20function serialize_models_HelloRequest(buffer_args) { 21 if (!(buffer_args instanceof models_HelloRequest)) { 22 throw new Error('Expected argument of type HelloRequest'); 23 } 24 return buffer_args.serialize(); 25} 26 27function deserialize_models_HelloRequest(buffer) { 28 return models_HelloRequest.getRootAsHelloRequest(new flatbuffers.ByteBuffer(buffer)) 29} 30 31 32var GreeterService = exports.GreeterService = { 33 SayHello: { 34 path: '/models.Greeter/SayHello', 35 requestStream: false, 36 responseStream: false, 37 requestType: flatbuffers.ByteBuffer, 38 responseType: models_HelloReply, 39 requestSerialize: serialize_models_HelloRequest, 40 requestDeserialize: deserialize_models_HelloRequest, 41 responseSerialize: serialize_models_HelloReply, 42 responseDeserialize: deserialize_models_HelloReply, 43 }, 44 SayManyHellos: { 45 path: '/models.Greeter/SayManyHellos', 46 requestStream: false, 47 responseStream: true, 48 requestType: flatbuffers.ByteBuffer, 49 responseType: models_HelloReply, 50 requestSerialize: serialize_models_HelloRequest, 51 requestDeserialize: deserialize_models_HelloRequest, 52 responseSerialize: serialize_models_HelloReply, 53 responseDeserialize: deserialize_models_HelloReply, 54 }, 55}; 56exports.GreeterClient = grpc.makeGenericClientConstructor(GreeterService); 57