package predictionv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
const _ = grpc.SupportPackageIsVersion9
const (
PredictionService_Predict_FullMethodName = "/hermes.prediction.v1.PredictionService/Predict"
)
type PredictionServiceClient interface {
Predict(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*PredictResponse, error)
}
type predictionServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPredictionServiceClient(cc grpc.ClientConnInterface) PredictionServiceClient {
return &predictionServiceClient{cc}
}
func (c *predictionServiceClient) Predict(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*PredictResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PredictResponse)
err := c.cc.Invoke(ctx, PredictionService_Predict_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
type PredictionServiceServer interface {
Predict(context.Context, *PredictRequest) (*PredictResponse, error)
mustEmbedUnimplementedPredictionServiceServer()
}
type UnimplementedPredictionServiceServer struct{}
func (UnimplementedPredictionServiceServer) Predict(context.Context, *PredictRequest) (*PredictResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Predict not implemented")
}
func (UnimplementedPredictionServiceServer) mustEmbedUnimplementedPredictionServiceServer() {}
func (UnimplementedPredictionServiceServer) testEmbeddedByValue() {}
type UnsafePredictionServiceServer interface {
mustEmbedUnimplementedPredictionServiceServer()
}
func RegisterPredictionServiceServer(s grpc.ServiceRegistrar, srv PredictionServiceServer) {
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&PredictionService_ServiceDesc, srv)
}
func _PredictionService_Predict_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PredictRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PredictionServiceServer).Predict(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PredictionService_Predict_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PredictionServiceServer).Predict(ctx, req.(*PredictRequest))
}
return interceptor(ctx, in, info, handler)
}
var PredictionService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "hermes.prediction.v1.PredictionService",
HandlerType: (*PredictionServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Predict",
Handler: _PredictionService_Predict_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "prediction.proto",
}