// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v5.29.3
// source: business/friend.ext.proto

package businesspb

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
)

// 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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	FriendExtService_SendMessage_FullMethodName = "/business.FriendExtService/SendMessage"
	FriendExtService_Add_FullMethodName         = "/business.FriendExtService/Add"
	FriendExtService_Agree_FullMethodName       = "/business.FriendExtService/Agree"
	FriendExtService_Set_FullMethodName         = "/business.FriendExtService/Set"
	FriendExtService_GetFriends_FullMethodName  = "/business.FriendExtService/GetFriends"
)

// FriendExtServiceClient is the client API for FriendExtService 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 FriendExtServiceClient interface {
	// 发送好友消息
	SendMessage(ctx context.Context, in *SendFriendMessageRequest, opts ...grpc.CallOption) (*SendFriendMessageReply, error)
	// 添加好友
	Add(ctx context.Context, in *FriendAddRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// 同意添加好友
	Agree(ctx context.Context, in *FriendAgreeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// 设置好友信息
	Set(ctx context.Context, in *FriendSetRequest, opts ...grpc.CallOption) (*FriendSetReply, error)
	// 获取好友列表
	GetFriends(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetFriendsReply, error)
}

type friendExtServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewFriendExtServiceClient(cc grpc.ClientConnInterface) FriendExtServiceClient {
	return &friendExtServiceClient{cc}
}

func (c *friendExtServiceClient) SendMessage(ctx context.Context, in *SendFriendMessageRequest, opts ...grpc.CallOption) (*SendFriendMessageReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SendFriendMessageReply)
	err := c.cc.Invoke(ctx, FriendExtService_SendMessage_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *friendExtServiceClient) Add(ctx context.Context, in *FriendAddRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, FriendExtService_Add_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *friendExtServiceClient) Agree(ctx context.Context, in *FriendAgreeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, FriendExtService_Agree_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *friendExtServiceClient) Set(ctx context.Context, in *FriendSetRequest, opts ...grpc.CallOption) (*FriendSetReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(FriendSetReply)
	err := c.cc.Invoke(ctx, FriendExtService_Set_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *friendExtServiceClient) GetFriends(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetFriendsReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetFriendsReply)
	err := c.cc.Invoke(ctx, FriendExtService_GetFriends_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// FriendExtServiceServer is the server API for FriendExtService service.
// All implementations must embed UnimplementedFriendExtServiceServer
// for forward compatibility.
type FriendExtServiceServer interface {
	// 发送好友消息
	SendMessage(context.Context, *SendFriendMessageRequest) (*SendFriendMessageReply, error)
	// 添加好友
	Add(context.Context, *FriendAddRequest) (*emptypb.Empty, error)
	// 同意添加好友
	Agree(context.Context, *FriendAgreeRequest) (*emptypb.Empty, error)
	// 设置好友信息
	Set(context.Context, *FriendSetRequest) (*FriendSetReply, error)
	// 获取好友列表
	GetFriends(context.Context, *emptypb.Empty) (*GetFriendsReply, error)
	mustEmbedUnimplementedFriendExtServiceServer()
}

// UnimplementedFriendExtServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedFriendExtServiceServer struct{}

func (UnimplementedFriendExtServiceServer) SendMessage(context.Context, *SendFriendMessageRequest) (*SendFriendMessageReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SendMessage not implemented")
}
func (UnimplementedFriendExtServiceServer) Add(context.Context, *FriendAddRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Add not implemented")
}
func (UnimplementedFriendExtServiceServer) Agree(context.Context, *FriendAgreeRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Agree not implemented")
}
func (UnimplementedFriendExtServiceServer) Set(context.Context, *FriendSetRequest) (*FriendSetReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Set not implemented")
}
func (UnimplementedFriendExtServiceServer) GetFriends(context.Context, *emptypb.Empty) (*GetFriendsReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetFriends not implemented")
}
func (UnimplementedFriendExtServiceServer) mustEmbedUnimplementedFriendExtServiceServer() {}
func (UnimplementedFriendExtServiceServer) testEmbeddedByValue()                          {}

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

func RegisterFriendExtServiceServer(s grpc.ServiceRegistrar, srv FriendExtServiceServer) {
	// If the following call pancis, it indicates UnimplementedFriendExtServiceServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&FriendExtService_ServiceDesc, srv)
}

func _FriendExtService_SendMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SendFriendMessageRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FriendExtServiceServer).SendMessage(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FriendExtService_SendMessage_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FriendExtServiceServer).SendMessage(ctx, req.(*SendFriendMessageRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FriendExtService_Add_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(FriendAddRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FriendExtServiceServer).Add(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FriendExtService_Add_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FriendExtServiceServer).Add(ctx, req.(*FriendAddRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FriendExtService_Agree_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(FriendAgreeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FriendExtServiceServer).Agree(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FriendExtService_Agree_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FriendExtServiceServer).Agree(ctx, req.(*FriendAgreeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FriendExtService_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(FriendSetRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FriendExtServiceServer).Set(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FriendExtService_Set_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FriendExtServiceServer).Set(ctx, req.(*FriendSetRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FriendExtService_GetFriends_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FriendExtServiceServer).GetFriends(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FriendExtService_GetFriends_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FriendExtServiceServer).GetFriends(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

// FriendExtService_ServiceDesc is the grpc.ServiceDesc for FriendExtService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FriendExtService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "business.FriendExtService",
	HandlerType: (*FriendExtServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendMessage",
			Handler:    _FriendExtService_SendMessage_Handler,
		},
		{
			MethodName: "Add",
			Handler:    _FriendExtService_Add_Handler,
		},
		{
			MethodName: "Agree",
			Handler:    _FriendExtService_Agree_Handler,
		},
		{
			MethodName: "Set",
			Handler:    _FriendExtService_Set_Handler,
		},
		{
			MethodName: "GetFriends",
			Handler:    _FriendExtService_GetFriends_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "business/friend.ext.proto",
}
