// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v4.25.3
// source: studentpb/student.proto

package __

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

// StudentServiceClient is the client API for StudentService 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 StudentServiceClient interface {
	StudentCreate(ctx context.Context, in *StudentRequest, opts ...grpc.CallOption) (*StudentCommonResonse, error)
	StudentDelete(ctx context.Context, in *StudentRequest, opts ...grpc.CallOption) (*StudentCommonResonse, error)
	StudentUpdate(ctx context.Context, in *StudentRequest, opts ...grpc.CallOption) (*StudentCommonResonse, error)
	StudentShow(ctx context.Context, in *StudentRequest, opts ...grpc.CallOption) (*StudentDetailResponse, error)
}

type studentServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewStudentServiceClient(cc grpc.ClientConnInterface) StudentServiceClient {
	return &studentServiceClient{cc}
}

func (c *studentServiceClient) StudentCreate(ctx context.Context, in *StudentRequest, opts ...grpc.CallOption) (*StudentCommonResonse, error) {
	out := new(StudentCommonResonse)
	err := c.cc.Invoke(ctx, "/studentpb.StudentService/StudentCreate", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *studentServiceClient) StudentDelete(ctx context.Context, in *StudentRequest, opts ...grpc.CallOption) (*StudentCommonResonse, error) {
	out := new(StudentCommonResonse)
	err := c.cc.Invoke(ctx, "/studentpb.StudentService/StudentDelete", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *studentServiceClient) StudentUpdate(ctx context.Context, in *StudentRequest, opts ...grpc.CallOption) (*StudentCommonResonse, error) {
	out := new(StudentCommonResonse)
	err := c.cc.Invoke(ctx, "/studentpb.StudentService/StudentUpdate", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *studentServiceClient) StudentShow(ctx context.Context, in *StudentRequest, opts ...grpc.CallOption) (*StudentDetailResponse, error) {
	out := new(StudentDetailResponse)
	err := c.cc.Invoke(ctx, "/studentpb.StudentService/StudentShow", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// StudentServiceServer is the server API for StudentService service.
// All implementations must embed UnimplementedStudentServiceServer
// for forward compatibility
type StudentServiceServer interface {
	StudentCreate(context.Context, *StudentRequest) (*StudentCommonResonse, error)
	StudentDelete(context.Context, *StudentRequest) (*StudentCommonResonse, error)
	StudentUpdate(context.Context, *StudentRequest) (*StudentCommonResonse, error)
	StudentShow(context.Context, *StudentRequest) (*StudentDetailResponse, error)
	mustEmbedUnimplementedStudentServiceServer()
}

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

func (UnimplementedStudentServiceServer) StudentCreate(context.Context, *StudentRequest) (*StudentCommonResonse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method StudentCreate not implemented")
}
func (UnimplementedStudentServiceServer) StudentDelete(context.Context, *StudentRequest) (*StudentCommonResonse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method StudentDelete not implemented")
}
func (UnimplementedStudentServiceServer) StudentUpdate(context.Context, *StudentRequest) (*StudentCommonResonse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method StudentUpdate not implemented")
}
func (UnimplementedStudentServiceServer) StudentShow(context.Context, *StudentRequest) (*StudentDetailResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method StudentShow not implemented")
}
func (UnimplementedStudentServiceServer) mustEmbedUnimplementedStudentServiceServer() {}

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

func RegisterStudentServiceServer(s grpc.ServiceRegistrar, srv StudentServiceServer) {
	s.RegisterService(&StudentService_ServiceDesc, srv)
}

func _StudentService_StudentCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(StudentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(StudentServiceServer).StudentCreate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/studentpb.StudentService/StudentCreate",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(StudentServiceServer).StudentCreate(ctx, req.(*StudentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _StudentService_StudentDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(StudentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(StudentServiceServer).StudentDelete(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/studentpb.StudentService/StudentDelete",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(StudentServiceServer).StudentDelete(ctx, req.(*StudentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _StudentService_StudentUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(StudentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(StudentServiceServer).StudentUpdate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/studentpb.StudentService/StudentUpdate",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(StudentServiceServer).StudentUpdate(ctx, req.(*StudentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _StudentService_StudentShow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(StudentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(StudentServiceServer).StudentShow(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/studentpb.StudentService/StudentShow",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(StudentServiceServer).StudentShow(ctx, req.(*StudentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// StudentService_ServiceDesc is the grpc.ServiceDesc for StudentService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var StudentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "studentpb.StudentService",
	HandlerType: (*StudentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "StudentCreate",
			Handler:    _StudentService_StudentCreate_Handler,
		},
		{
			MethodName: "StudentDelete",
			Handler:    _StudentService_StudentDelete_Handler,
		},
		{
			MethodName: "StudentUpdate",
			Handler:    _StudentService_StudentUpdate_Handler,
		},
		{
			MethodName: "StudentShow",
			Handler:    _StudentService_StudentShow_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "studentpb/student.proto",
}
