// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v5.27.2
// source: aifea.proto

package biz

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// FeaFeederClient is the client API for FeaFeeder service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type FeaFeederClient interface {
	SubFeatures(ctx context.Context, in *SubReq, opts ...grpc.CallOption) (FeaFeeder_SubFeaturesClient, error)
}

type feaFeederClient struct {
	cc grpc.ClientConnInterface
}

func NewFeaFeederClient(cc grpc.ClientConnInterface) FeaFeederClient {
	return &feaFeederClient{cc}
}

func (c *feaFeederClient) SubFeatures(ctx context.Context, in *SubReq, opts ...grpc.CallOption) (FeaFeeder_SubFeaturesClient, error) {
	stream, err := c.cc.NewStream(ctx, &FeaFeeder_ServiceDesc.Streams[0], "/FeaFeeder/SubFeatures", opts...)
	if err != nil {
		return nil, err
	}
	x := &feaFeederSubFeaturesClient{stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

type FeaFeeder_SubFeaturesClient interface {
	Recv() (*ArrMap, error)
	grpc.ClientStream
}

type feaFeederSubFeaturesClient struct {
	grpc.ClientStream
}

func (x *feaFeederSubFeaturesClient) Recv() (*ArrMap, error) {
	m := new(ArrMap)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

// FeaFeederServer is the server API for FeaFeeder service.
// All implementations must embed UnimplementedFeaFeederServer
// for forward compatibility
type FeaFeederServer interface {
	SubFeatures(*SubReq, FeaFeeder_SubFeaturesServer) error
	mustEmbedUnimplementedFeaFeederServer()
}

// UnimplementedFeaFeederServer must be embedded to have forward compatible implementations.
type UnimplementedFeaFeederServer struct {
}

func (UnimplementedFeaFeederServer) SubFeatures(*SubReq, FeaFeeder_SubFeaturesServer) error {
	return status.Errorf(codes.Unimplemented, "method SubFeatures not implemented")
}
func (UnimplementedFeaFeederServer) mustEmbedUnimplementedFeaFeederServer() {}

// UnsafeFeaFeederServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FeaFeederServer will
// result in compilation errors.
type UnsafeFeaFeederServer interface {
	mustEmbedUnimplementedFeaFeederServer()
}

func RegisterFeaFeederServer(s grpc.ServiceRegistrar, srv FeaFeederServer) {
	s.RegisterService(&FeaFeeder_ServiceDesc, srv)
}

func _FeaFeeder_SubFeatures_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(SubReq)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(FeaFeederServer).SubFeatures(m, &feaFeederSubFeaturesServer{stream})
}

type FeaFeeder_SubFeaturesServer interface {
	Send(*ArrMap) error
	grpc.ServerStream
}

type feaFeederSubFeaturesServer struct {
	grpc.ServerStream
}

func (x *feaFeederSubFeaturesServer) Send(m *ArrMap) error {
	return x.ServerStream.SendMsg(m)
}

// FeaFeeder_ServiceDesc is the grpc.ServiceDesc for FeaFeeder service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FeaFeeder_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "FeaFeeder",
	HandlerType: (*FeaFeederServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SubFeatures",
			Handler:       _FeaFeeder_SubFeatures_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "aifea.proto",
}

// AInferClient is the client API for AInfer service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type AInferClient interface {
	Trend(ctx context.Context, in *ArrMap, opts ...grpc.CallOption) (*ArrMap, error)
	Trade(ctx context.Context, in *ArrMap, opts ...grpc.CallOption) (*ArrMap, error)
}

type aInferClient struct {
	cc grpc.ClientConnInterface
}

func NewAInferClient(cc grpc.ClientConnInterface) AInferClient {
	return &aInferClient{cc}
}

func (c *aInferClient) Trend(ctx context.Context, in *ArrMap, opts ...grpc.CallOption) (*ArrMap, error) {
	out := new(ArrMap)
	err := c.cc.Invoke(ctx, "/AInfer/Trend", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *aInferClient) Trade(ctx context.Context, in *ArrMap, opts ...grpc.CallOption) (*ArrMap, error) {
	out := new(ArrMap)
	err := c.cc.Invoke(ctx, "/AInfer/Trade", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// AInferServer is the server API for AInfer service.
// All implementations must embed UnimplementedAInferServer
// for forward compatibility
type AInferServer interface {
	Trend(context.Context, *ArrMap) (*ArrMap, error)
	Trade(context.Context, *ArrMap) (*ArrMap, error)
	mustEmbedUnimplementedAInferServer()
}

// UnimplementedAInferServer must be embedded to have forward compatible implementations.
type UnimplementedAInferServer struct {
}

func (UnimplementedAInferServer) Trend(context.Context, *ArrMap) (*ArrMap, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Trend not implemented")
}
func (UnimplementedAInferServer) Trade(context.Context, *ArrMap) (*ArrMap, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Trade not implemented")
}
func (UnimplementedAInferServer) mustEmbedUnimplementedAInferServer() {}

// UnsafeAInferServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AInferServer will
// result in compilation errors.
type UnsafeAInferServer interface {
	mustEmbedUnimplementedAInferServer()
}

func RegisterAInferServer(s grpc.ServiceRegistrar, srv AInferServer) {
	s.RegisterService(&AInfer_ServiceDesc, srv)
}

func _AInfer_Trend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ArrMap)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AInferServer).Trend(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/AInfer/Trend",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AInferServer).Trend(ctx, req.(*ArrMap))
	}
	return interceptor(ctx, in, info, handler)
}

func _AInfer_Trade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ArrMap)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AInferServer).Trade(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/AInfer/Trade",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AInferServer).Trade(ctx, req.(*ArrMap))
	}
	return interceptor(ctx, in, info, handler)
}

// AInfer_ServiceDesc is the grpc.ServiceDesc for AInfer service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AInfer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "AInfer",
	HandlerType: (*AInferServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Trend",
			Handler:    _AInfer_Trend_Handler,
		},
		{
			MethodName: "Trade",
			Handler:    _AInfer_Trade_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "aifea.proto",
}
