package pb

import (
	"context"

	"google.golang.org/grpc"
)

type ChatServiceServer interface {
	AddChatSessions(context.Context, *AddChatSessionsReq) (*AddChatSessionsResp, error)
	UpdateChatSessions(context.Context, *UpdateChatSessionsReq) (*UpdateChatSessionsResp, error)
	DelChatSessions(context.Context, *DelChatSessionsReq) (*DelChatSessionsResp, error)
	GetChatSessionsById(context.Context, *GetChatSessionsByIdReq) (*GetChatSessionsByIdResp, error)
	SearchChatSessions(context.Context, *SearchChatSessionsReq) (*SearchChatSessionsResp, error)
	AddParticipant(context.Context, *AddParticipantReq) (*AddParticipantResp, error)
	RemoveParticipant(context.Context, *RemoveParticipantReq) (*RemoveParticipantResp, error)
	AddChatMessages(context.Context, *AddChatMessagesReq) (*AddChatMessagesResp, error)
	DelChatMessages(context.Context, *DelChatMessagesReq) (*DelChatMessagesResp, error)
	GetChatMessagesById(context.Context, *GetChatMessagesByIdReq) (*GetChatMessagesByIdResp, error)
	SearchChatMessages(context.Context, *SearchChatMessagesReq) (*SearchChatMessagesResp, error)
	mustEmbedUnimplementedChatServiceServer()
}

type UnimplementedChatServiceServer struct{}

func (UnimplementedChatServiceServer) AddChatSessions(context.Context, *AddChatSessionsReq) (*AddChatSessionsResp, error) {
	return nil, grpc.Errorf(12, "method AddChatSessions not implemented")
}
func (UnimplementedChatServiceServer) UpdateChatSessions(context.Context, *UpdateChatSessionsReq) (*UpdateChatSessionsResp, error) {
	return nil, grpc.Errorf(12, "method UpdateChatSessions not implemented")
}
func (UnimplementedChatServiceServer) DelChatSessions(context.Context, *DelChatSessionsReq) (*DelChatSessionsResp, error) {
	return nil, grpc.Errorf(12, "method DelChatSessions not implemented")
}
func (UnimplementedChatServiceServer) GetChatSessionsById(context.Context, *GetChatSessionsByIdReq) (*GetChatSessionsByIdResp, error) {
	return nil, grpc.Errorf(12, "method GetChatSessionsById not implemented")
}
func (UnimplementedChatServiceServer) SearchChatSessions(context.Context, *SearchChatSessionsReq) (*SearchChatSessionsResp, error) {
	return nil, grpc.Errorf(12, "method SearchChatSessions not implemented")
}
func (UnimplementedChatServiceServer) AddParticipant(context.Context, *AddParticipantReq) (*AddParticipantResp, error) {
	return nil, grpc.Errorf(12, "method AddParticipant not implemented")
}
func (UnimplementedChatServiceServer) RemoveParticipant(context.Context, *RemoveParticipantReq) (*RemoveParticipantResp, error) {
	return nil, grpc.Errorf(12, "method RemoveParticipant not implemented")
}
func (UnimplementedChatServiceServer) AddChatMessages(context.Context, *AddChatMessagesReq) (*AddChatMessagesResp, error) {
	return nil, grpc.Errorf(12, "method AddChatMessages not implemented")
}
func (UnimplementedChatServiceServer) DelChatMessages(context.Context, *DelChatMessagesReq) (*DelChatMessagesResp, error) {
	return nil, grpc.Errorf(12, "method DelChatMessages not implemented")
}
func (UnimplementedChatServiceServer) GetChatMessagesById(context.Context, *GetChatMessagesByIdReq) (*GetChatMessagesByIdResp, error) {
	return nil, grpc.Errorf(12, "method GetChatMessagesById not implemented")
}
func (UnimplementedChatServiceServer) SearchChatMessages(context.Context, *SearchChatMessagesReq) (*SearchChatMessagesResp, error) {
	return nil, grpc.Errorf(12, "method SearchChatMessages not implemented")
}
func (UnimplementedChatServiceServer) mustEmbedUnimplementedChatServiceServer() {}

type UnsafeChatServiceServer interface {
	mustEmbedUnimplementedChatServiceServer()
}

type ChatServiceClient interface {
	AddChatSessions(ctx context.Context, in *AddChatSessionsReq, opts ...grpc.CallOption) (*AddChatSessionsResp, error)
	UpdateChatSessions(ctx context.Context, in *UpdateChatSessionsReq, opts ...grpc.CallOption) (*UpdateChatSessionsResp, error)
	DelChatSessions(ctx context.Context, in *DelChatSessionsReq, opts ...grpc.CallOption) (*DelChatSessionsResp, error)
	GetChatSessionsById(ctx context.Context, in *GetChatSessionsByIdReq, opts ...grpc.CallOption) (*GetChatSessionsByIdResp, error)
	SearchChatSessions(ctx context.Context, in *SearchChatSessionsReq, opts ...grpc.CallOption) (*SearchChatSessionsResp, error)
	AddParticipant(ctx context.Context, in *AddParticipantReq, opts ...grpc.CallOption) (*AddParticipantResp, error)
	RemoveParticipant(ctx context.Context, in *RemoveParticipantReq, opts ...grpc.CallOption) (*RemoveParticipantResp, error)
	AddChatMessages(ctx context.Context, in *AddChatMessagesReq, opts ...grpc.CallOption) (*AddChatMessagesResp, error)
	DelChatMessages(ctx context.Context, in *DelChatMessagesReq, opts ...grpc.CallOption) (*DelChatMessagesResp, error)
	GetChatMessagesById(ctx context.Context, in *GetChatMessagesByIdReq, opts ...grpc.CallOption) (*GetChatMessagesByIdResp, error)
	SearchChatMessages(ctx context.Context, in *SearchChatMessagesReq, opts ...grpc.CallOption) (*SearchChatMessagesResp, error)
}

type chatServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewChatServiceClient(cc grpc.ClientConnInterface) ChatServiceClient {
	return &chatServiceClient{cc}
}

func (c *chatServiceClient) AddChatSessions(ctx context.Context, in *AddChatSessionsReq, opts ...grpc.CallOption) (*AddChatSessionsResp, error) {
	out := new(AddChatSessionsResp)
	err := c.cc.Invoke(ctx, "/pb.chatService/AddChatSessions", in, out, opts...)
	return out, err
}

func (c *chatServiceClient) UpdateChatSessions(ctx context.Context, in *UpdateChatSessionsReq, opts ...grpc.CallOption) (*UpdateChatSessionsResp, error) {
	out := new(UpdateChatSessionsResp)
	err := c.cc.Invoke(ctx, "/pb.chatService/UpdateChatSessions", in, out, opts...)
	return out, err
}

func (c *chatServiceClient) DelChatSessions(ctx context.Context, in *DelChatSessionsReq, opts ...grpc.CallOption) (*DelChatSessionsResp, error) {
	out := new(DelChatSessionsResp)
	err := c.cc.Invoke(ctx, "/pb.chatService/DelChatSessions", in, out, opts...)
	return out, err
}

func (c *chatServiceClient) GetChatSessionsById(ctx context.Context, in *GetChatSessionsByIdReq, opts ...grpc.CallOption) (*GetChatSessionsByIdResp, error) {
	out := new(GetChatSessionsByIdResp)
	err := c.cc.Invoke(ctx, "/pb.chatService/GetChatSessionsById", in, out, opts...)
	return out, err
}

func (c *chatServiceClient) SearchChatSessions(ctx context.Context, in *SearchChatSessionsReq, opts ...grpc.CallOption) (*SearchChatSessionsResp, error) {
	out := new(SearchChatSessionsResp)
	err := c.cc.Invoke(ctx, "/pb.chatService/SearchChatSessions", in, out, opts...)
	return out, err
}

func (c *chatServiceClient) AddParticipant(ctx context.Context, in *AddParticipantReq, opts ...grpc.CallOption) (*AddParticipantResp, error) {
	out := new(AddParticipantResp)
	err := c.cc.Invoke(ctx, "/pb.chatService/AddParticipant", in, out, opts...)
	return out, err
}

func (c *chatServiceClient) RemoveParticipant(ctx context.Context, in *RemoveParticipantReq, opts ...grpc.CallOption) (*RemoveParticipantResp, error) {
	out := new(RemoveParticipantResp)
	err := c.cc.Invoke(ctx, "/pb.chatService/RemoveParticipant", in, out, opts...)
	return out, err
}

func (c *chatServiceClient) AddChatMessages(ctx context.Context, in *AddChatMessagesReq, opts ...grpc.CallOption) (*AddChatMessagesResp, error) {
	out := new(AddChatMessagesResp)
	err := c.cc.Invoke(ctx, "/pb.chatService/AddChatMessages", in, out, opts...)
	return out, err
}

func (c *chatServiceClient) DelChatMessages(ctx context.Context, in *DelChatMessagesReq, opts ...grpc.CallOption) (*DelChatMessagesResp, error) {
	out := new(DelChatMessagesResp)
	err := c.cc.Invoke(ctx, "/pb.chatService/DelChatMessages", in, out, opts...)
	return out, err
}

func (c *chatServiceClient) GetChatMessagesById(ctx context.Context, in *GetChatMessagesByIdReq, opts ...grpc.CallOption) (*GetChatMessagesByIdResp, error) {
	out := new(GetChatMessagesByIdResp)
	err := c.cc.Invoke(ctx, "/pb.chatService/GetChatMessagesById", in, out, opts...)
	return out, err
}

func (c *chatServiceClient) SearchChatMessages(ctx context.Context, in *SearchChatMessagesReq, opts ...grpc.CallOption) (*SearchChatMessagesResp, error) {
	out := new(SearchChatMessagesResp)
	err := c.cc.Invoke(ctx, "/pb.chatService/SearchChatMessages", in, out, opts...)
	return out, err
}

var ChatService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.chatService",
	HandlerType: (*ChatServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{MethodName: "AddChatSessions", Handler: _ChatService_AddChatSessions_Handler},
		{MethodName: "UpdateChatSessions", Handler: _ChatService_UpdateChatSessions_Handler},
		{MethodName: "DelChatSessions", Handler: _ChatService_DelChatSessions_Handler},
		{MethodName: "GetChatSessionsById", Handler: _ChatService_GetChatSessionsById_Handler},
		{MethodName: "SearchChatSessions", Handler: _ChatService_SearchChatSessions_Handler},
		{MethodName: "AddParticipant", Handler: _ChatService_AddParticipant_Handler},
		{MethodName: "RemoveParticipant", Handler: _ChatService_RemoveParticipant_Handler},
		{MethodName: "AddChatMessages", Handler: _ChatService_AddChatMessages_Handler},
		{MethodName: "DelChatMessages", Handler: _ChatService_DelChatMessages_Handler},
		{MethodName: "GetChatMessagesById", Handler: _ChatService_GetChatMessagesById_Handler},
		{MethodName: "SearchChatMessages", Handler: _ChatService_SearchChatMessages_Handler},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "chat.proto",
}

func RegisterChatServiceServer(s grpc.ServiceRegistrar, srv ChatServiceServer) {
	s.RegisterService(&ChatService_ServiceDesc, srv)
}
