// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v5.29.3
// source: couchbase/kv/v1/kv.proto

package kv_v1

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 (
	KvService_Get_FullMethodName            = "/couchbase.kv.v1.KvService/Get"
	KvService_GetAndTouch_FullMethodName    = "/couchbase.kv.v1.KvService/GetAndTouch"
	KvService_GetAndLock_FullMethodName     = "/couchbase.kv.v1.KvService/GetAndLock"
	KvService_Unlock_FullMethodName         = "/couchbase.kv.v1.KvService/Unlock"
	KvService_Touch_FullMethodName          = "/couchbase.kv.v1.KvService/Touch"
	KvService_Exists_FullMethodName         = "/couchbase.kv.v1.KvService/Exists"
	KvService_Insert_FullMethodName         = "/couchbase.kv.v1.KvService/Insert"
	KvService_Upsert_FullMethodName         = "/couchbase.kv.v1.KvService/Upsert"
	KvService_Replace_FullMethodName        = "/couchbase.kv.v1.KvService/Replace"
	KvService_Remove_FullMethodName         = "/couchbase.kv.v1.KvService/Remove"
	KvService_Increment_FullMethodName      = "/couchbase.kv.v1.KvService/Increment"
	KvService_Decrement_FullMethodName      = "/couchbase.kv.v1.KvService/Decrement"
	KvService_Append_FullMethodName         = "/couchbase.kv.v1.KvService/Append"
	KvService_Prepend_FullMethodName        = "/couchbase.kv.v1.KvService/Prepend"
	KvService_LookupIn_FullMethodName       = "/couchbase.kv.v1.KvService/LookupIn"
	KvService_MutateIn_FullMethodName       = "/couchbase.kv.v1.KvService/MutateIn"
	KvService_GetAllReplicas_FullMethodName = "/couchbase.kv.v1.KvService/GetAllReplicas"
)

// KvServiceClient is the client API for KvService 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 KvServiceClient interface {
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	GetAndTouch(ctx context.Context, in *GetAndTouchRequest, opts ...grpc.CallOption) (*GetAndTouchResponse, error)
	GetAndLock(ctx context.Context, in *GetAndLockRequest, opts ...grpc.CallOption) (*GetAndLockResponse, error)
	Unlock(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error)
	Touch(ctx context.Context, in *TouchRequest, opts ...grpc.CallOption) (*TouchResponse, error)
	Exists(ctx context.Context, in *ExistsRequest, opts ...grpc.CallOption) (*ExistsResponse, error)
	Insert(ctx context.Context, in *InsertRequest, opts ...grpc.CallOption) (*InsertResponse, error)
	Upsert(ctx context.Context, in *UpsertRequest, opts ...grpc.CallOption) (*UpsertResponse, error)
	Replace(ctx context.Context, in *ReplaceRequest, opts ...grpc.CallOption) (*ReplaceResponse, error)
	Remove(ctx context.Context, in *RemoveRequest, opts ...grpc.CallOption) (*RemoveResponse, error)
	Increment(ctx context.Context, in *IncrementRequest, opts ...grpc.CallOption) (*IncrementResponse, error)
	Decrement(ctx context.Context, in *DecrementRequest, opts ...grpc.CallOption) (*DecrementResponse, error)
	Append(ctx context.Context, in *AppendRequest, opts ...grpc.CallOption) (*AppendResponse, error)
	Prepend(ctx context.Context, in *PrependRequest, opts ...grpc.CallOption) (*PrependResponse, error)
	LookupIn(ctx context.Context, in *LookupInRequest, opts ...grpc.CallOption) (*LookupInResponse, error)
	MutateIn(ctx context.Context, in *MutateInRequest, opts ...grpc.CallOption) (*MutateInResponse, error)
	GetAllReplicas(ctx context.Context, in *GetAllReplicasRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GetAllReplicasResponse], error)
}

type kvServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewKvServiceClient(cc grpc.ClientConnInterface) KvServiceClient {
	return &kvServiceClient{cc}
}

func (c *kvServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetResponse)
	err := c.cc.Invoke(ctx, KvService_Get_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *kvServiceClient) GetAndTouch(ctx context.Context, in *GetAndTouchRequest, opts ...grpc.CallOption) (*GetAndTouchResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetAndTouchResponse)
	err := c.cc.Invoke(ctx, KvService_GetAndTouch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *kvServiceClient) GetAndLock(ctx context.Context, in *GetAndLockRequest, opts ...grpc.CallOption) (*GetAndLockResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetAndLockResponse)
	err := c.cc.Invoke(ctx, KvService_GetAndLock_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *kvServiceClient) Unlock(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(UnlockResponse)
	err := c.cc.Invoke(ctx, KvService_Unlock_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *kvServiceClient) Touch(ctx context.Context, in *TouchRequest, opts ...grpc.CallOption) (*TouchResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(TouchResponse)
	err := c.cc.Invoke(ctx, KvService_Touch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *kvServiceClient) Exists(ctx context.Context, in *ExistsRequest, opts ...grpc.CallOption) (*ExistsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ExistsResponse)
	err := c.cc.Invoke(ctx, KvService_Exists_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *kvServiceClient) Insert(ctx context.Context, in *InsertRequest, opts ...grpc.CallOption) (*InsertResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(InsertResponse)
	err := c.cc.Invoke(ctx, KvService_Insert_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *kvServiceClient) Upsert(ctx context.Context, in *UpsertRequest, opts ...grpc.CallOption) (*UpsertResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(UpsertResponse)
	err := c.cc.Invoke(ctx, KvService_Upsert_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *kvServiceClient) Replace(ctx context.Context, in *ReplaceRequest, opts ...grpc.CallOption) (*ReplaceResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ReplaceResponse)
	err := c.cc.Invoke(ctx, KvService_Replace_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *kvServiceClient) Remove(ctx context.Context, in *RemoveRequest, opts ...grpc.CallOption) (*RemoveResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RemoveResponse)
	err := c.cc.Invoke(ctx, KvService_Remove_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *kvServiceClient) Increment(ctx context.Context, in *IncrementRequest, opts ...grpc.CallOption) (*IncrementResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(IncrementResponse)
	err := c.cc.Invoke(ctx, KvService_Increment_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *kvServiceClient) Decrement(ctx context.Context, in *DecrementRequest, opts ...grpc.CallOption) (*DecrementResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DecrementResponse)
	err := c.cc.Invoke(ctx, KvService_Decrement_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *kvServiceClient) Append(ctx context.Context, in *AppendRequest, opts ...grpc.CallOption) (*AppendResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(AppendResponse)
	err := c.cc.Invoke(ctx, KvService_Append_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *kvServiceClient) Prepend(ctx context.Context, in *PrependRequest, opts ...grpc.CallOption) (*PrependResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(PrependResponse)
	err := c.cc.Invoke(ctx, KvService_Prepend_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *kvServiceClient) LookupIn(ctx context.Context, in *LookupInRequest, opts ...grpc.CallOption) (*LookupInResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(LookupInResponse)
	err := c.cc.Invoke(ctx, KvService_LookupIn_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *kvServiceClient) MutateIn(ctx context.Context, in *MutateInRequest, opts ...grpc.CallOption) (*MutateInResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(MutateInResponse)
	err := c.cc.Invoke(ctx, KvService_MutateIn_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *kvServiceClient) GetAllReplicas(ctx context.Context, in *GetAllReplicasRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GetAllReplicasResponse], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &KvService_ServiceDesc.Streams[0], KvService_GetAllReplicas_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[GetAllReplicasRequest, GetAllReplicasResponse]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type KvService_GetAllReplicasClient = grpc.ServerStreamingClient[GetAllReplicasResponse]

// KvServiceServer is the server API for KvService service.
// All implementations must embed UnimplementedKvServiceServer
// for forward compatibility.
type KvServiceServer interface {
	Get(context.Context, *GetRequest) (*GetResponse, error)
	GetAndTouch(context.Context, *GetAndTouchRequest) (*GetAndTouchResponse, error)
	GetAndLock(context.Context, *GetAndLockRequest) (*GetAndLockResponse, error)
	Unlock(context.Context, *UnlockRequest) (*UnlockResponse, error)
	Touch(context.Context, *TouchRequest) (*TouchResponse, error)
	Exists(context.Context, *ExistsRequest) (*ExistsResponse, error)
	Insert(context.Context, *InsertRequest) (*InsertResponse, error)
	Upsert(context.Context, *UpsertRequest) (*UpsertResponse, error)
	Replace(context.Context, *ReplaceRequest) (*ReplaceResponse, error)
	Remove(context.Context, *RemoveRequest) (*RemoveResponse, error)
	Increment(context.Context, *IncrementRequest) (*IncrementResponse, error)
	Decrement(context.Context, *DecrementRequest) (*DecrementResponse, error)
	Append(context.Context, *AppendRequest) (*AppendResponse, error)
	Prepend(context.Context, *PrependRequest) (*PrependResponse, error)
	LookupIn(context.Context, *LookupInRequest) (*LookupInResponse, error)
	MutateIn(context.Context, *MutateInRequest) (*MutateInResponse, error)
	GetAllReplicas(*GetAllReplicasRequest, grpc.ServerStreamingServer[GetAllReplicasResponse]) error
	mustEmbedUnimplementedKvServiceServer()
}

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

func (UnimplementedKvServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedKvServiceServer) GetAndTouch(context.Context, *GetAndTouchRequest) (*GetAndTouchResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetAndTouch not implemented")
}
func (UnimplementedKvServiceServer) GetAndLock(context.Context, *GetAndLockRequest) (*GetAndLockResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetAndLock not implemented")
}
func (UnimplementedKvServiceServer) Unlock(context.Context, *UnlockRequest) (*UnlockResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Unlock not implemented")
}
func (UnimplementedKvServiceServer) Touch(context.Context, *TouchRequest) (*TouchResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Touch not implemented")
}
func (UnimplementedKvServiceServer) Exists(context.Context, *ExistsRequest) (*ExistsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Exists not implemented")
}
func (UnimplementedKvServiceServer) Insert(context.Context, *InsertRequest) (*InsertResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Insert not implemented")
}
func (UnimplementedKvServiceServer) Upsert(context.Context, *UpsertRequest) (*UpsertResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Upsert not implemented")
}
func (UnimplementedKvServiceServer) Replace(context.Context, *ReplaceRequest) (*ReplaceResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Replace not implemented")
}
func (UnimplementedKvServiceServer) Remove(context.Context, *RemoveRequest) (*RemoveResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Remove not implemented")
}
func (UnimplementedKvServiceServer) Increment(context.Context, *IncrementRequest) (*IncrementResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Increment not implemented")
}
func (UnimplementedKvServiceServer) Decrement(context.Context, *DecrementRequest) (*DecrementResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Decrement not implemented")
}
func (UnimplementedKvServiceServer) Append(context.Context, *AppendRequest) (*AppendResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Append not implemented")
}
func (UnimplementedKvServiceServer) Prepend(context.Context, *PrependRequest) (*PrependResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Prepend not implemented")
}
func (UnimplementedKvServiceServer) LookupIn(context.Context, *LookupInRequest) (*LookupInResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method LookupIn not implemented")
}
func (UnimplementedKvServiceServer) MutateIn(context.Context, *MutateInRequest) (*MutateInResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method MutateIn not implemented")
}
func (UnimplementedKvServiceServer) GetAllReplicas(*GetAllReplicasRequest, grpc.ServerStreamingServer[GetAllReplicasResponse]) error {
	return status.Errorf(codes.Unimplemented, "method GetAllReplicas not implemented")
}
func (UnimplementedKvServiceServer) mustEmbedUnimplementedKvServiceServer() {}
func (UnimplementedKvServiceServer) testEmbeddedByValue()                   {}

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

func RegisterKvServiceServer(s grpc.ServiceRegistrar, srv KvServiceServer) {
	// If the following call pancis, it indicates UnimplementedKvServiceServer 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(&KvService_ServiceDesc, srv)
}

func _KvService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KvServiceServer).Get(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KvService_Get_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KvServiceServer).Get(ctx, req.(*GetRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KvService_GetAndTouch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetAndTouchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KvServiceServer).GetAndTouch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KvService_GetAndTouch_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KvServiceServer).GetAndTouch(ctx, req.(*GetAndTouchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KvService_GetAndLock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetAndLockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KvServiceServer).GetAndLock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KvService_GetAndLock_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KvServiceServer).GetAndLock(ctx, req.(*GetAndLockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KvService_Unlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UnlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KvServiceServer).Unlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KvService_Unlock_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KvServiceServer).Unlock(ctx, req.(*UnlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KvService_Touch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(TouchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KvServiceServer).Touch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KvService_Touch_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KvServiceServer).Touch(ctx, req.(*TouchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KvService_Exists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ExistsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KvServiceServer).Exists(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KvService_Exists_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KvServiceServer).Exists(ctx, req.(*ExistsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KvService_Insert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(InsertRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KvServiceServer).Insert(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KvService_Insert_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KvServiceServer).Insert(ctx, req.(*InsertRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KvService_Upsert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpsertRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KvServiceServer).Upsert(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KvService_Upsert_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KvServiceServer).Upsert(ctx, req.(*UpsertRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KvService_Replace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReplaceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KvServiceServer).Replace(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KvService_Replace_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KvServiceServer).Replace(ctx, req.(*ReplaceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KvService_Remove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RemoveRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KvServiceServer).Remove(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KvService_Remove_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KvServiceServer).Remove(ctx, req.(*RemoveRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KvService_Increment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(IncrementRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KvServiceServer).Increment(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KvService_Increment_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KvServiceServer).Increment(ctx, req.(*IncrementRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KvService_Decrement_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DecrementRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KvServiceServer).Decrement(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KvService_Decrement_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KvServiceServer).Decrement(ctx, req.(*DecrementRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KvService_Append_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AppendRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KvServiceServer).Append(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KvService_Append_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KvServiceServer).Append(ctx, req.(*AppendRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KvService_Prepend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PrependRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KvServiceServer).Prepend(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KvService_Prepend_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KvServiceServer).Prepend(ctx, req.(*PrependRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KvService_LookupIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(LookupInRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KvServiceServer).LookupIn(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KvService_LookupIn_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KvServiceServer).LookupIn(ctx, req.(*LookupInRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KvService_MutateIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(MutateInRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KvServiceServer).MutateIn(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KvService_MutateIn_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KvServiceServer).MutateIn(ctx, req.(*MutateInRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KvService_GetAllReplicas_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(GetAllReplicasRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(KvServiceServer).GetAllReplicas(m, &grpc.GenericServerStream[GetAllReplicasRequest, GetAllReplicasResponse]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type KvService_GetAllReplicasServer = grpc.ServerStreamingServer[GetAllReplicasResponse]

// KvService_ServiceDesc is the grpc.ServiceDesc for KvService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var KvService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "couchbase.kv.v1.KvService",
	HandlerType: (*KvServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _KvService_Get_Handler,
		},
		{
			MethodName: "GetAndTouch",
			Handler:    _KvService_GetAndTouch_Handler,
		},
		{
			MethodName: "GetAndLock",
			Handler:    _KvService_GetAndLock_Handler,
		},
		{
			MethodName: "Unlock",
			Handler:    _KvService_Unlock_Handler,
		},
		{
			MethodName: "Touch",
			Handler:    _KvService_Touch_Handler,
		},
		{
			MethodName: "Exists",
			Handler:    _KvService_Exists_Handler,
		},
		{
			MethodName: "Insert",
			Handler:    _KvService_Insert_Handler,
		},
		{
			MethodName: "Upsert",
			Handler:    _KvService_Upsert_Handler,
		},
		{
			MethodName: "Replace",
			Handler:    _KvService_Replace_Handler,
		},
		{
			MethodName: "Remove",
			Handler:    _KvService_Remove_Handler,
		},
		{
			MethodName: "Increment",
			Handler:    _KvService_Increment_Handler,
		},
		{
			MethodName: "Decrement",
			Handler:    _KvService_Decrement_Handler,
		},
		{
			MethodName: "Append",
			Handler:    _KvService_Append_Handler,
		},
		{
			MethodName: "Prepend",
			Handler:    _KvService_Prepend_Handler,
		},
		{
			MethodName: "LookupIn",
			Handler:    _KvService_LookupIn_Handler,
		},
		{
			MethodName: "MutateIn",
			Handler:    _KvService_MutateIn_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetAllReplicas",
			Handler:       _KvService_GetAllReplicas_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "couchbase/kv/v1/kv.proto",
}
