// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc             v7.34.1
// source: review.proto

package pb

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 (
	ReviewService_AddReviews_FullMethodName     = "/pb.reviewService/AddReviews"
	ReviewService_UpdateReviews_FullMethodName  = "/pb.reviewService/UpdateReviews"
	ReviewService_DelReviews_FullMethodName     = "/pb.reviewService/DelReviews"
	ReviewService_GetReviewsById_FullMethodName = "/pb.reviewService/GetReviewsById"
	ReviewService_SearchReviews_FullMethodName  = "/pb.reviewService/SearchReviews"
)

// ReviewServiceClient is the client API for ReviewService 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 ReviewServiceClient interface {
	// -----------------------reviews-----------------------
	AddReviews(ctx context.Context, in *AddReviewsReq, opts ...grpc.CallOption) (*AddReviewsResp, error)
	UpdateReviews(ctx context.Context, in *UpdateReviewsReq, opts ...grpc.CallOption) (*UpdateReviewsResp, error)
	DelReviews(ctx context.Context, in *DelReviewsReq, opts ...grpc.CallOption) (*DelReviewsResp, error)
	GetReviewsById(ctx context.Context, in *GetReviewsByIdReq, opts ...grpc.CallOption) (*GetReviewsByIdResp, error)
	SearchReviews(ctx context.Context, in *SearchReviewsReq, opts ...grpc.CallOption) (*SearchReviewsResp, error)
}

type reviewServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewReviewServiceClient(cc grpc.ClientConnInterface) ReviewServiceClient {
	return &reviewServiceClient{cc}
}

func (c *reviewServiceClient) AddReviews(ctx context.Context, in *AddReviewsReq, opts ...grpc.CallOption) (*AddReviewsResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(AddReviewsResp)
	err := c.cc.Invoke(ctx, ReviewService_AddReviews_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *reviewServiceClient) UpdateReviews(ctx context.Context, in *UpdateReviewsReq, opts ...grpc.CallOption) (*UpdateReviewsResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(UpdateReviewsResp)
	err := c.cc.Invoke(ctx, ReviewService_UpdateReviews_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *reviewServiceClient) DelReviews(ctx context.Context, in *DelReviewsReq, opts ...grpc.CallOption) (*DelReviewsResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DelReviewsResp)
	err := c.cc.Invoke(ctx, ReviewService_DelReviews_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *reviewServiceClient) GetReviewsById(ctx context.Context, in *GetReviewsByIdReq, opts ...grpc.CallOption) (*GetReviewsByIdResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetReviewsByIdResp)
	err := c.cc.Invoke(ctx, ReviewService_GetReviewsById_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *reviewServiceClient) SearchReviews(ctx context.Context, in *SearchReviewsReq, opts ...grpc.CallOption) (*SearchReviewsResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SearchReviewsResp)
	err := c.cc.Invoke(ctx, ReviewService_SearchReviews_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ReviewServiceServer is the server API for ReviewService service.
// All implementations must embed UnimplementedReviewServiceServer
// for forward compatibility.
type ReviewServiceServer interface {
	// -----------------------reviews-----------------------
	AddReviews(context.Context, *AddReviewsReq) (*AddReviewsResp, error)
	UpdateReviews(context.Context, *UpdateReviewsReq) (*UpdateReviewsResp, error)
	DelReviews(context.Context, *DelReviewsReq) (*DelReviewsResp, error)
	GetReviewsById(context.Context, *GetReviewsByIdReq) (*GetReviewsByIdResp, error)
	SearchReviews(context.Context, *SearchReviewsReq) (*SearchReviewsResp, error)
	mustEmbedUnimplementedReviewServiceServer()
}

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

func (UnimplementedReviewServiceServer) AddReviews(context.Context, *AddReviewsReq) (*AddReviewsResp, error) {
	return nil, status.Error(codes.Unimplemented, "method AddReviews not implemented")
}
func (UnimplementedReviewServiceServer) UpdateReviews(context.Context, *UpdateReviewsReq) (*UpdateReviewsResp, error) {
	return nil, status.Error(codes.Unimplemented, "method UpdateReviews not implemented")
}
func (UnimplementedReviewServiceServer) DelReviews(context.Context, *DelReviewsReq) (*DelReviewsResp, error) {
	return nil, status.Error(codes.Unimplemented, "method DelReviews not implemented")
}
func (UnimplementedReviewServiceServer) GetReviewsById(context.Context, *GetReviewsByIdReq) (*GetReviewsByIdResp, error) {
	return nil, status.Error(codes.Unimplemented, "method GetReviewsById not implemented")
}
func (UnimplementedReviewServiceServer) SearchReviews(context.Context, *SearchReviewsReq) (*SearchReviewsResp, error) {
	return nil, status.Error(codes.Unimplemented, "method SearchReviews not implemented")
}
func (UnimplementedReviewServiceServer) mustEmbedUnimplementedReviewServiceServer() {}
func (UnimplementedReviewServiceServer) testEmbeddedByValue()                       {}

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

func RegisterReviewServiceServer(s grpc.ServiceRegistrar, srv ReviewServiceServer) {
	// If the following call panics, it indicates UnimplementedReviewServiceServer 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(&ReviewService_ServiceDesc, srv)
}

func _ReviewService_AddReviews_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AddReviewsReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ReviewServiceServer).AddReviews(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ReviewService_AddReviews_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ReviewServiceServer).AddReviews(ctx, req.(*AddReviewsReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _ReviewService_UpdateReviews_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateReviewsReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ReviewServiceServer).UpdateReviews(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ReviewService_UpdateReviews_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ReviewServiceServer).UpdateReviews(ctx, req.(*UpdateReviewsReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _ReviewService_DelReviews_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DelReviewsReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ReviewServiceServer).DelReviews(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ReviewService_DelReviews_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ReviewServiceServer).DelReviews(ctx, req.(*DelReviewsReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _ReviewService_GetReviewsById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetReviewsByIdReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ReviewServiceServer).GetReviewsById(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ReviewService_GetReviewsById_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ReviewServiceServer).GetReviewsById(ctx, req.(*GetReviewsByIdReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _ReviewService_SearchReviews_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SearchReviewsReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ReviewServiceServer).SearchReviews(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ReviewService_SearchReviews_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ReviewServiceServer).SearchReviews(ctx, req.(*SearchReviewsReq))
	}
	return interceptor(ctx, in, info, handler)
}

// ReviewService_ServiceDesc is the grpc.ServiceDesc for ReviewService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ReviewService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.reviewService",
	HandlerType: (*ReviewServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddReviews",
			Handler:    _ReviewService_AddReviews_Handler,
		},
		{
			MethodName: "UpdateReviews",
			Handler:    _ReviewService_UpdateReviews_Handler,
		},
		{
			MethodName: "DelReviews",
			Handler:    _ReviewService_DelReviews_Handler,
		},
		{
			MethodName: "GetReviewsById",
			Handler:    _ReviewService_GetReviewsById_Handler,
		},
		{
			MethodName: "SearchReviews",
			Handler:    _ReviewService_SearchReviews_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "review.proto",
}
