// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc             v7.35.1
// source: module/social/group/proto/group.proto

package group

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

const (
	Basic_Search_FullMethodName  = "/group.Basic/Search"
	Basic_Fetch_FullMethodName   = "/group.Basic/Fetch"
	Basic_Get_FullMethodName     = "/group.Basic/Get"
	Basic_Create_FullMethodName  = "/group.Basic/Create"
	Basic_Modify_FullMethodName  = "/group.Basic/Modify"
	Basic_Disband_FullMethodName = "/group.Basic/Disband"
)

// BasicClient is the client API for Basic 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 BasicClient interface {
	// 搜索
	Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*GroupsReply, error)
	// 获取群组列表
	Fetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GroupsReply, error)
	// 获取群组信息
	Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*GroupItem, error)
	// 创建群组
	Create(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*DataStatusReply, error)
	// 修改群组信息
	Modify(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*DataStatusReply, error)
	// 解散群组
	Disband(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error)
}

type basicClient struct {
	cc grpc.ClientConnInterface
}

func NewBasicClient(cc grpc.ClientConnInterface) BasicClient {
	return &basicClient{cc}
}

func (c *basicClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*GroupsReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GroupsReply)
	err := c.cc.Invoke(ctx, Basic_Search_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *basicClient) Fetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GroupsReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GroupsReply)
	err := c.cc.Invoke(ctx, Basic_Fetch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *basicClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*GroupItem, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GroupItem)
	err := c.cc.Invoke(ctx, Basic_Get_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *basicClient) Create(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*DataStatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DataStatusReply)
	err := c.cc.Invoke(ctx, Basic_Create_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *basicClient) Modify(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*DataStatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DataStatusReply)
	err := c.cc.Invoke(ctx, Basic_Modify_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *basicClient) Disband(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DataStatusReply)
	err := c.cc.Invoke(ctx, Basic_Disband_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// BasicServer is the server API for Basic service.
// All implementations should embed UnimplementedBasicServer
// for forward compatibility.
//
// 群组
type BasicServer interface {
	// 搜索
	Search(context.Context, *SearchRequest) (*GroupsReply, error)
	// 获取群组列表
	Fetch(context.Context, *Empty) (*GroupsReply, error)
	// 获取群组信息
	Get(context.Context, *IdentRequest) (*GroupItem, error)
	// 创建群组
	Create(context.Context, *GroupItem) (*DataStatusReply, error)
	// 修改群组信息
	Modify(context.Context, *GroupItem) (*DataStatusReply, error)
	// 解散群组
	Disband(context.Context, *IdentRequest) (*DataStatusReply, error)
}

// UnimplementedBasicServer should 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 UnimplementedBasicServer struct{}

func (UnimplementedBasicServer) Search(context.Context, *SearchRequest) (*GroupsReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Search not implemented")
}
func (UnimplementedBasicServer) Fetch(context.Context, *Empty) (*GroupsReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
}
func (UnimplementedBasicServer) Get(context.Context, *IdentRequest) (*GroupItem, error) {
	return nil, status.Error(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedBasicServer) Create(context.Context, *GroupItem) (*DataStatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedBasicServer) Modify(context.Context, *GroupItem) (*DataStatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Modify not implemented")
}
func (UnimplementedBasicServer) Disband(context.Context, *IdentRequest) (*DataStatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Disband not implemented")
}
func (UnimplementedBasicServer) testEmbeddedByValue() {}

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

func RegisterBasicServer(s grpc.ServiceRegistrar, srv BasicServer) {
	// If the following call panics, it indicates UnimplementedBasicServer 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(&Basic_ServiceDesc, srv)
}

func _Basic_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SearchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BasicServer).Search(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Basic_Search_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BasicServer).Search(ctx, req.(*SearchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

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

func _Basic_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(IdentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BasicServer).Get(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Basic_Get_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BasicServer).Get(ctx, req.(*IdentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Basic_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GroupItem)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BasicServer).Create(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Basic_Create_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BasicServer).Create(ctx, req.(*GroupItem))
	}
	return interceptor(ctx, in, info, handler)
}

func _Basic_Modify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GroupItem)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BasicServer).Modify(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Basic_Modify_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BasicServer).Modify(ctx, req.(*GroupItem))
	}
	return interceptor(ctx, in, info, handler)
}

func _Basic_Disband_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(IdentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BasicServer).Disband(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Basic_Disband_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BasicServer).Disband(ctx, req.(*IdentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Basic_ServiceDesc is the grpc.ServiceDesc for Basic service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Basic_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "group.Basic",
	HandlerType: (*BasicServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Search",
			Handler:    _Basic_Search_Handler,
		},
		{
			MethodName: "Fetch",
			Handler:    _Basic_Fetch_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Basic_Get_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _Basic_Create_Handler,
		},
		{
			MethodName: "Modify",
			Handler:    _Basic_Modify_Handler,
		},
		{
			MethodName: "Disband",
			Handler:    _Basic_Disband_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "module/social/group/proto/group.proto",
}
