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

package gitalypb

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

// ObjectPoolServiceClient is the client API for ObjectPoolService 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 ObjectPoolServiceClient interface {
	// This comment is left unintentionally blank.
	CreateObjectPool(ctx context.Context, in *CreateObjectPoolRequest, opts ...grpc.CallOption) (*CreateObjectPoolResponse, error)
	// This comment is left unintentionally blank.
	DeleteObjectPool(ctx context.Context, in *DeleteObjectPoolRequest, opts ...grpc.CallOption) (*DeleteObjectPoolResponse, error)
	// Repositories are assumed to be stored on the same disk
	LinkRepositoryToObjectPool(ctx context.Context, in *LinkRepositoryToObjectPoolRequest, opts ...grpc.CallOption) (*LinkRepositoryToObjectPoolResponse, error)
	// This comment is left unintentionally blank.
	ReduplicateRepository(ctx context.Context, in *ReduplicateRepositoryRequest, opts ...grpc.CallOption) (*ReduplicateRepositoryResponse, error)
	// This comment is left unintentionally blank.
	DisconnectGitAlternates(ctx context.Context, in *DisconnectGitAlternatesRequest, opts ...grpc.CallOption) (*DisconnectGitAlternatesResponse, error)
	// FetchIntoObjectPool fetches all references from a pool member into an object pool so that
	// objects shared between this repository and other pool members can be deduplicated. This RPC
	// will perform housekeeping tasks after the object pool has been updated to ensure that the pool
	// is in an optimal state.
	FetchIntoObjectPool(ctx context.Context, in *FetchIntoObjectPoolRequest, opts ...grpc.CallOption) (*FetchIntoObjectPoolResponse, error)
	// This comment is left unintentionally blank.
	GetObjectPool(ctx context.Context, in *GetObjectPoolRequest, opts ...grpc.CallOption) (*GetObjectPoolResponse, error)
}

type objectPoolServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewObjectPoolServiceClient(cc grpc.ClientConnInterface) ObjectPoolServiceClient {
	return &objectPoolServiceClient{cc}
}

func (c *objectPoolServiceClient) CreateObjectPool(ctx context.Context, in *CreateObjectPoolRequest, opts ...grpc.CallOption) (*CreateObjectPoolResponse, error) {
	out := new(CreateObjectPoolResponse)
	err := c.cc.Invoke(ctx, "/gitaly.ObjectPoolService/CreateObjectPool", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *objectPoolServiceClient) DeleteObjectPool(ctx context.Context, in *DeleteObjectPoolRequest, opts ...grpc.CallOption) (*DeleteObjectPoolResponse, error) {
	out := new(DeleteObjectPoolResponse)
	err := c.cc.Invoke(ctx, "/gitaly.ObjectPoolService/DeleteObjectPool", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *objectPoolServiceClient) LinkRepositoryToObjectPool(ctx context.Context, in *LinkRepositoryToObjectPoolRequest, opts ...grpc.CallOption) (*LinkRepositoryToObjectPoolResponse, error) {
	out := new(LinkRepositoryToObjectPoolResponse)
	err := c.cc.Invoke(ctx, "/gitaly.ObjectPoolService/LinkRepositoryToObjectPool", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *objectPoolServiceClient) ReduplicateRepository(ctx context.Context, in *ReduplicateRepositoryRequest, opts ...grpc.CallOption) (*ReduplicateRepositoryResponse, error) {
	out := new(ReduplicateRepositoryResponse)
	err := c.cc.Invoke(ctx, "/gitaly.ObjectPoolService/ReduplicateRepository", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *objectPoolServiceClient) DisconnectGitAlternates(ctx context.Context, in *DisconnectGitAlternatesRequest, opts ...grpc.CallOption) (*DisconnectGitAlternatesResponse, error) {
	out := new(DisconnectGitAlternatesResponse)
	err := c.cc.Invoke(ctx, "/gitaly.ObjectPoolService/DisconnectGitAlternates", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *objectPoolServiceClient) FetchIntoObjectPool(ctx context.Context, in *FetchIntoObjectPoolRequest, opts ...grpc.CallOption) (*FetchIntoObjectPoolResponse, error) {
	out := new(FetchIntoObjectPoolResponse)
	err := c.cc.Invoke(ctx, "/gitaly.ObjectPoolService/FetchIntoObjectPool", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *objectPoolServiceClient) GetObjectPool(ctx context.Context, in *GetObjectPoolRequest, opts ...grpc.CallOption) (*GetObjectPoolResponse, error) {
	out := new(GetObjectPoolResponse)
	err := c.cc.Invoke(ctx, "/gitaly.ObjectPoolService/GetObjectPool", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ObjectPoolServiceServer is the server API for ObjectPoolService service.
// All implementations must embed UnimplementedObjectPoolServiceServer
// for forward compatibility
type ObjectPoolServiceServer interface {
	// This comment is left unintentionally blank.
	CreateObjectPool(context.Context, *CreateObjectPoolRequest) (*CreateObjectPoolResponse, error)
	// This comment is left unintentionally blank.
	DeleteObjectPool(context.Context, *DeleteObjectPoolRequest) (*DeleteObjectPoolResponse, error)
	// Repositories are assumed to be stored on the same disk
	LinkRepositoryToObjectPool(context.Context, *LinkRepositoryToObjectPoolRequest) (*LinkRepositoryToObjectPoolResponse, error)
	// This comment is left unintentionally blank.
	ReduplicateRepository(context.Context, *ReduplicateRepositoryRequest) (*ReduplicateRepositoryResponse, error)
	// This comment is left unintentionally blank.
	DisconnectGitAlternates(context.Context, *DisconnectGitAlternatesRequest) (*DisconnectGitAlternatesResponse, error)
	// FetchIntoObjectPool fetches all references from a pool member into an object pool so that
	// objects shared between this repository and other pool members can be deduplicated. This RPC
	// will perform housekeeping tasks after the object pool has been updated to ensure that the pool
	// is in an optimal state.
	FetchIntoObjectPool(context.Context, *FetchIntoObjectPoolRequest) (*FetchIntoObjectPoolResponse, error)
	// This comment is left unintentionally blank.
	GetObjectPool(context.Context, *GetObjectPoolRequest) (*GetObjectPoolResponse, error)
	mustEmbedUnimplementedObjectPoolServiceServer()
}

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

func (UnimplementedObjectPoolServiceServer) CreateObjectPool(context.Context, *CreateObjectPoolRequest) (*CreateObjectPoolResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateObjectPool not implemented")
}
func (UnimplementedObjectPoolServiceServer) DeleteObjectPool(context.Context, *DeleteObjectPoolRequest) (*DeleteObjectPoolResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteObjectPool not implemented")
}
func (UnimplementedObjectPoolServiceServer) LinkRepositoryToObjectPool(context.Context, *LinkRepositoryToObjectPoolRequest) (*LinkRepositoryToObjectPoolResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method LinkRepositoryToObjectPool not implemented")
}
func (UnimplementedObjectPoolServiceServer) ReduplicateRepository(context.Context, *ReduplicateRepositoryRequest) (*ReduplicateRepositoryResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ReduplicateRepository not implemented")
}
func (UnimplementedObjectPoolServiceServer) DisconnectGitAlternates(context.Context, *DisconnectGitAlternatesRequest) (*DisconnectGitAlternatesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DisconnectGitAlternates not implemented")
}
func (UnimplementedObjectPoolServiceServer) FetchIntoObjectPool(context.Context, *FetchIntoObjectPoolRequest) (*FetchIntoObjectPoolResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method FetchIntoObjectPool not implemented")
}
func (UnimplementedObjectPoolServiceServer) GetObjectPool(context.Context, *GetObjectPoolRequest) (*GetObjectPoolResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetObjectPool not implemented")
}
func (UnimplementedObjectPoolServiceServer) mustEmbedUnimplementedObjectPoolServiceServer() {}

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

func RegisterObjectPoolServiceServer(s grpc.ServiceRegistrar, srv ObjectPoolServiceServer) {
	s.RegisterService(&ObjectPoolService_ServiceDesc, srv)
}

func _ObjectPoolService_CreateObjectPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateObjectPoolRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ObjectPoolServiceServer).CreateObjectPool(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/gitaly.ObjectPoolService/CreateObjectPool",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ObjectPoolServiceServer).CreateObjectPool(ctx, req.(*CreateObjectPoolRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ObjectPoolService_DeleteObjectPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteObjectPoolRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ObjectPoolServiceServer).DeleteObjectPool(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/gitaly.ObjectPoolService/DeleteObjectPool",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ObjectPoolServiceServer).DeleteObjectPool(ctx, req.(*DeleteObjectPoolRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ObjectPoolService_LinkRepositoryToObjectPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(LinkRepositoryToObjectPoolRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ObjectPoolServiceServer).LinkRepositoryToObjectPool(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/gitaly.ObjectPoolService/LinkRepositoryToObjectPool",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ObjectPoolServiceServer).LinkRepositoryToObjectPool(ctx, req.(*LinkRepositoryToObjectPoolRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ObjectPoolService_ReduplicateRepository_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReduplicateRepositoryRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ObjectPoolServiceServer).ReduplicateRepository(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/gitaly.ObjectPoolService/ReduplicateRepository",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ObjectPoolServiceServer).ReduplicateRepository(ctx, req.(*ReduplicateRepositoryRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ObjectPoolService_DisconnectGitAlternates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DisconnectGitAlternatesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ObjectPoolServiceServer).DisconnectGitAlternates(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/gitaly.ObjectPoolService/DisconnectGitAlternates",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ObjectPoolServiceServer).DisconnectGitAlternates(ctx, req.(*DisconnectGitAlternatesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ObjectPoolService_FetchIntoObjectPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(FetchIntoObjectPoolRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ObjectPoolServiceServer).FetchIntoObjectPool(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/gitaly.ObjectPoolService/FetchIntoObjectPool",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ObjectPoolServiceServer).FetchIntoObjectPool(ctx, req.(*FetchIntoObjectPoolRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ObjectPoolService_GetObjectPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetObjectPoolRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ObjectPoolServiceServer).GetObjectPool(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/gitaly.ObjectPoolService/GetObjectPool",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ObjectPoolServiceServer).GetObjectPool(ctx, req.(*GetObjectPoolRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ObjectPoolService_ServiceDesc is the grpc.ServiceDesc for ObjectPoolService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ObjectPoolService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gitaly.ObjectPoolService",
	HandlerType: (*ObjectPoolServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateObjectPool",
			Handler:    _ObjectPoolService_CreateObjectPool_Handler,
		},
		{
			MethodName: "DeleteObjectPool",
			Handler:    _ObjectPoolService_DeleteObjectPool_Handler,
		},
		{
			MethodName: "LinkRepositoryToObjectPool",
			Handler:    _ObjectPoolService_LinkRepositoryToObjectPool_Handler,
		},
		{
			MethodName: "ReduplicateRepository",
			Handler:    _ObjectPoolService_ReduplicateRepository_Handler,
		},
		{
			MethodName: "DisconnectGitAlternates",
			Handler:    _ObjectPoolService_DisconnectGitAlternates_Handler,
		},
		{
			MethodName: "FetchIntoObjectPool",
			Handler:    _ObjectPoolService_FetchIntoObjectPool_Handler,
		},
		{
			MethodName: "GetObjectPool",
			Handler:    _ObjectPoolService_GetObjectPool_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "objectpool.proto",
}
