// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             (unknown)
// source: proto/rpc/audit/auditlog.proto

package eventv1

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

// AuditLogServiceClient is the client API for AuditLogService 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 AuditLogServiceClient interface {
	GetAuditLog(ctx context.Context, in *GetAuditLogSearchRequest, opts ...grpc.CallOption) (*GetAuditLogSearchResponse, error)
	GetAuditLogByProjects(ctx context.Context, in *GetAuditLogSearchRequest, opts ...grpc.CallOption) (*GetAuditLogSearchResponse, error)
}

type auditLogServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewAuditLogServiceClient(cc grpc.ClientConnInterface) AuditLogServiceClient {
	return &auditLogServiceClient{cc}
}

func (c *auditLogServiceClient) GetAuditLog(ctx context.Context, in *GetAuditLogSearchRequest, opts ...grpc.CallOption) (*GetAuditLogSearchResponse, error) {
	out := new(GetAuditLogSearchResponse)
	err := c.cc.Invoke(ctx, "/rep.framework.event.v1.AuditLogService/GetAuditLog", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *auditLogServiceClient) GetAuditLogByProjects(ctx context.Context, in *GetAuditLogSearchRequest, opts ...grpc.CallOption) (*GetAuditLogSearchResponse, error) {
	out := new(GetAuditLogSearchResponse)
	err := c.cc.Invoke(ctx, "/rep.framework.event.v1.AuditLogService/GetAuditLogByProjects", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// AuditLogServiceServer is the server API for AuditLogService service.
// All implementations should embed UnimplementedAuditLogServiceServer
// for forward compatibility
type AuditLogServiceServer interface {
	GetAuditLog(context.Context, *GetAuditLogSearchRequest) (*GetAuditLogSearchResponse, error)
	GetAuditLogByProjects(context.Context, *GetAuditLogSearchRequest) (*GetAuditLogSearchResponse, error)
}

// UnimplementedAuditLogServiceServer should be embedded to have forward compatible implementations.
type UnimplementedAuditLogServiceServer struct {
}

func (UnimplementedAuditLogServiceServer) GetAuditLog(context.Context, *GetAuditLogSearchRequest) (*GetAuditLogSearchResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetAuditLog not implemented")
}
func (UnimplementedAuditLogServiceServer) GetAuditLogByProjects(context.Context, *GetAuditLogSearchRequest) (*GetAuditLogSearchResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetAuditLogByProjects not implemented")
}

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

func RegisterAuditLogServiceServer(s grpc.ServiceRegistrar, srv AuditLogServiceServer) {
	s.RegisterService(&AuditLogService_ServiceDesc, srv)
}

func _AuditLogService_GetAuditLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetAuditLogSearchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AuditLogServiceServer).GetAuditLog(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/rep.framework.event.v1.AuditLogService/GetAuditLog",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AuditLogServiceServer).GetAuditLog(ctx, req.(*GetAuditLogSearchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AuditLogService_GetAuditLogByProjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetAuditLogSearchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AuditLogServiceServer).GetAuditLogByProjects(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/rep.framework.event.v1.AuditLogService/GetAuditLogByProjects",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AuditLogServiceServer).GetAuditLogByProjects(ctx, req.(*GetAuditLogSearchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// AuditLogService_ServiceDesc is the grpc.ServiceDesc for AuditLogService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AuditLogService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "rep.framework.event.v1.AuditLogService",
	HandlerType: (*AuditLogServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAuditLog",
			Handler:    _AuditLogService_GetAuditLog_Handler,
		},
		{
			MethodName: "GetAuditLogByProjects",
			Handler:    _AuditLogService_GetAuditLogByProjects_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/rpc/audit/auditlog.proto",
}
