// Code generated by protoc-gen-go-grpc. DO NOT EDIT.

package api_change

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	common "server/app_comm/api/common"
)

// 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

// ChangeServiceClient is the client API for ChangeService 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 ChangeServiceClient interface {
	// === DB information
	GetDiff(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*Values, error)
	GetAll(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*ChageAllInfo, error)
	// Common
	GetMeta(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*common.Meta, error)
}

type changeServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewChangeServiceClient(cc grpc.ClientConnInterface) ChangeServiceClient {
	return &changeServiceClient{cc}
}

func (c *changeServiceClient) GetDiff(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*Values, error) {
	out := new(Values)
	err := c.cc.Invoke(ctx, "/pagerino.change.ChangeService/GetDiff", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *changeServiceClient) GetAll(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*ChageAllInfo, error) {
	out := new(ChageAllInfo)
	err := c.cc.Invoke(ctx, "/pagerino.change.ChangeService/GetAll", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *changeServiceClient) GetMeta(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*common.Meta, error) {
	out := new(common.Meta)
	err := c.cc.Invoke(ctx, "/pagerino.change.ChangeService/GetMeta", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ChangeServiceServer is the server API for ChangeService service.
// All implementations must embed UnimplementedChangeServiceServer
// for forward compatibility
type ChangeServiceServer interface {
	// === DB information
	GetDiff(context.Context, *common.Index) (*Values, error)
	GetAll(context.Context, *common.Index) (*ChageAllInfo, error)
	// Common
	GetMeta(context.Context, *common.Index) (*common.Meta, error)
	mustEmbedUnimplementedChangeServiceServer()
}

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

func (UnimplementedChangeServiceServer) GetDiff(context.Context, *common.Index) (*Values, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetDiff not implemented")
}
func (UnimplementedChangeServiceServer) GetAll(context.Context, *common.Index) (*ChageAllInfo, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetAll not implemented")
}
func (UnimplementedChangeServiceServer) GetMeta(context.Context, *common.Index) (*common.Meta, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetMeta not implemented")
}
func (UnimplementedChangeServiceServer) mustEmbedUnimplementedChangeServiceServer() {}

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

func RegisterChangeServiceServer(s grpc.ServiceRegistrar, srv ChangeServiceServer) {
	s.RegisterService(&ChangeService_ServiceDesc, srv)
}

func _ChangeService_GetDiff_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(common.Index)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ChangeServiceServer).GetDiff(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pagerino.change.ChangeService/GetDiff",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ChangeServiceServer).GetDiff(ctx, req.(*common.Index))
	}
	return interceptor(ctx, in, info, handler)
}

func _ChangeService_GetAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(common.Index)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ChangeServiceServer).GetAll(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pagerino.change.ChangeService/GetAll",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ChangeServiceServer).GetAll(ctx, req.(*common.Index))
	}
	return interceptor(ctx, in, info, handler)
}

func _ChangeService_GetMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(common.Index)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ChangeServiceServer).GetMeta(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pagerino.change.ChangeService/GetMeta",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ChangeServiceServer).GetMeta(ctx, req.(*common.Index))
	}
	return interceptor(ctx, in, info, handler)
}

// ChangeService_ServiceDesc is the grpc.ServiceDesc for ChangeService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ChangeService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pagerino.change.ChangeService",
	HandlerType: (*ChangeServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetDiff",
			Handler:    _ChangeService_GetDiff_Handler,
		},
		{
			MethodName: "GetAll",
			Handler:    _ChangeService_GetAll_Handler,
		},
		{
			MethodName: "GetMeta",
			Handler:    _ChangeService_GetMeta_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "change.proto",
}
