// Code generated by protoc-gen-go-grpc. DO NOT EDIT.

package ewallet

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

// EWalletClient is the client API for EWallet 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 EWalletClient interface {
	Send(ctx context.Context, in *SendRequest, opts ...grpc.CallOption) (*SendResponse, error)
	GetLast(ctx context.Context, in *GetLastRequest, opts ...grpc.CallOption) (*GetLastResponse, error)
}

type eWalletClient struct {
	cc grpc.ClientConnInterface
}

func NewEWalletClient(cc grpc.ClientConnInterface) EWalletClient {
	return &eWalletClient{cc}
}

func (c *eWalletClient) Send(ctx context.Context, in *SendRequest, opts ...grpc.CallOption) (*SendResponse, error) {
	out := new(SendResponse)
	err := c.cc.Invoke(ctx, "/ewallet.EWallet/Send", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *eWalletClient) GetLast(ctx context.Context, in *GetLastRequest, opts ...grpc.CallOption) (*GetLastResponse, error) {
	out := new(GetLastResponse)
	err := c.cc.Invoke(ctx, "/ewallet.EWallet/GetLast", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// EWalletServer is the server API for EWallet service.
// All implementations must embed UnimplementedEWalletServer
// for forward compatibility
type EWalletServer interface {
	Send(context.Context, *SendRequest) (*SendResponse, error)
	GetLast(context.Context, *GetLastRequest) (*GetLastResponse, error)
	mustEmbedUnimplementedEWalletServer()
}

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

func (UnimplementedEWalletServer) Send(context.Context, *SendRequest) (*SendResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Send not implemented")
}
func (UnimplementedEWalletServer) GetLast(context.Context, *GetLastRequest) (*GetLastResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetLast not implemented")
}
func (UnimplementedEWalletServer) mustEmbedUnimplementedEWalletServer() {}

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

func RegisterEWalletServer(s grpc.ServiceRegistrar, srv EWalletServer) {
	s.RegisterService(&EWallet_ServiceDesc, srv)
}

func _EWallet_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SendRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(EWalletServer).Send(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ewallet.EWallet/Send",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(EWalletServer).Send(ctx, req.(*SendRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _EWallet_GetLast_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetLastRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(EWalletServer).GetLast(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ewallet.EWallet/GetLast",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(EWalletServer).GetLast(ctx, req.(*GetLastRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// EWallet_ServiceDesc is the grpc.ServiceDesc for EWallet service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var EWallet_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ewallet.EWallet",
	HandlerType: (*EWalletServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Send",
			Handler:    _EWallet_Send_Handler,
		},
		{
			MethodName: "GetLast",
			Handler:    _EWallet_GetLast_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ewallet.proto",
}
