// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v3.21.1
// source: praefect/mock/mock.proto

package mock

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
)

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

// SimpleServiceClient is the client API for SimpleService 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 SimpleServiceClient interface {
	// RepoAccessorUnary is a unary RPC that accesses a repo
	RepoAccessorUnary(ctx context.Context, in *RepoRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// RepoMutatorUnary is a unary RPC that mutates a repo
	RepoMutatorUnary(ctx context.Context, in *RepoRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// RepoMaintenanceUnary is a unary RPC that maintains a repo
	RepoMaintenanceUnary(ctx context.Context, in *RepoRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

type simpleServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewSimpleServiceClient(cc grpc.ClientConnInterface) SimpleServiceClient {
	return &simpleServiceClient{cc}
}

func (c *simpleServiceClient) RepoAccessorUnary(ctx context.Context, in *RepoRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, "/mock.SimpleService/RepoAccessorUnary", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *simpleServiceClient) RepoMutatorUnary(ctx context.Context, in *RepoRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, "/mock.SimpleService/RepoMutatorUnary", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *simpleServiceClient) RepoMaintenanceUnary(ctx context.Context, in *RepoRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, "/mock.SimpleService/RepoMaintenanceUnary", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// SimpleServiceServer is the server API for SimpleService service.
// All implementations must embed UnimplementedSimpleServiceServer
// for forward compatibility
type SimpleServiceServer interface {
	// RepoAccessorUnary is a unary RPC that accesses a repo
	RepoAccessorUnary(context.Context, *RepoRequest) (*emptypb.Empty, error)
	// RepoMutatorUnary is a unary RPC that mutates a repo
	RepoMutatorUnary(context.Context, *RepoRequest) (*emptypb.Empty, error)
	// RepoMaintenanceUnary is a unary RPC that maintains a repo
	RepoMaintenanceUnary(context.Context, *RepoRequest) (*emptypb.Empty, error)
	mustEmbedUnimplementedSimpleServiceServer()
}

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

func (UnimplementedSimpleServiceServer) RepoAccessorUnary(context.Context, *RepoRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RepoAccessorUnary not implemented")
}
func (UnimplementedSimpleServiceServer) RepoMutatorUnary(context.Context, *RepoRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RepoMutatorUnary not implemented")
}
func (UnimplementedSimpleServiceServer) RepoMaintenanceUnary(context.Context, *RepoRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RepoMaintenanceUnary not implemented")
}
func (UnimplementedSimpleServiceServer) mustEmbedUnimplementedSimpleServiceServer() {}

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

func RegisterSimpleServiceServer(s grpc.ServiceRegistrar, srv SimpleServiceServer) {
	s.RegisterService(&SimpleService_ServiceDesc, srv)
}

func _SimpleService_RepoAccessorUnary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RepoRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SimpleServiceServer).RepoAccessorUnary(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/mock.SimpleService/RepoAccessorUnary",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SimpleServiceServer).RepoAccessorUnary(ctx, req.(*RepoRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SimpleService_RepoMutatorUnary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RepoRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SimpleServiceServer).RepoMutatorUnary(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/mock.SimpleService/RepoMutatorUnary",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SimpleServiceServer).RepoMutatorUnary(ctx, req.(*RepoRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SimpleService_RepoMaintenanceUnary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RepoRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SimpleServiceServer).RepoMaintenanceUnary(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/mock.SimpleService/RepoMaintenanceUnary",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SimpleServiceServer).RepoMaintenanceUnary(ctx, req.(*RepoRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// SimpleService_ServiceDesc is the grpc.ServiceDesc for SimpleService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SimpleService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "mock.SimpleService",
	HandlerType: (*SimpleServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RepoAccessorUnary",
			Handler:    _SimpleService_RepoAccessorUnary_Handler,
		},
		{
			MethodName: "RepoMutatorUnary",
			Handler:    _SimpleService_RepoMutatorUnary_Handler,
		},
		{
			MethodName: "RepoMaintenanceUnary",
			Handler:    _SimpleService_RepoMaintenanceUnary_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "praefect/mock/mock.proto",
}
