// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc             (unknown)
// source: qsfera/services/search/v0/search.proto

package v0

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 (
	SearchProvider_Search_FullMethodName     = "/qsfera.services.search.v0.SearchProvider/Search"
	SearchProvider_IndexSpace_FullMethodName = "/qsfera.services.search.v0.SearchProvider/IndexSpace"
)

// SearchProviderClient is the client API for SearchProvider 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 SearchProviderClient interface {
	Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error)
	IndexSpace(ctx context.Context, in *IndexSpaceRequest, opts ...grpc.CallOption) (*IndexSpaceResponse, error)
}

type searchProviderClient struct {
	cc grpc.ClientConnInterface
}

func NewSearchProviderClient(cc grpc.ClientConnInterface) SearchProviderClient {
	return &searchProviderClient{cc}
}

func (c *searchProviderClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SearchResponse)
	err := c.cc.Invoke(ctx, SearchProvider_Search_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *searchProviderClient) IndexSpace(ctx context.Context, in *IndexSpaceRequest, opts ...grpc.CallOption) (*IndexSpaceResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(IndexSpaceResponse)
	err := c.cc.Invoke(ctx, SearchProvider_IndexSpace_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// SearchProviderServer is the server API for SearchProvider service.
// All implementations must embed UnimplementedSearchProviderServer
// for forward compatibility.
type SearchProviderServer interface {
	Search(context.Context, *SearchRequest) (*SearchResponse, error)
	IndexSpace(context.Context, *IndexSpaceRequest) (*IndexSpaceResponse, error)
	mustEmbedUnimplementedSearchProviderServer()
}

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

func (UnimplementedSearchProviderServer) Search(context.Context, *SearchRequest) (*SearchResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method Search not implemented")
}
func (UnimplementedSearchProviderServer) IndexSpace(context.Context, *IndexSpaceRequest) (*IndexSpaceResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method IndexSpace not implemented")
}
func (UnimplementedSearchProviderServer) mustEmbedUnimplementedSearchProviderServer() {}
func (UnimplementedSearchProviderServer) testEmbeddedByValue()                        {}

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

func RegisterSearchProviderServer(s grpc.ServiceRegistrar, srv SearchProviderServer) {
	// If the following call panics, it indicates UnimplementedSearchProviderServer 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(&SearchProvider_ServiceDesc, srv)
}

func _SearchProvider_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SearchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SearchProviderServer).Search(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SearchProvider_Search_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SearchProviderServer).Search(ctx, req.(*SearchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SearchProvider_IndexSpace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(IndexSpaceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SearchProviderServer).IndexSpace(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SearchProvider_IndexSpace_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SearchProviderServer).IndexSpace(ctx, req.(*IndexSpaceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// SearchProvider_ServiceDesc is the grpc.ServiceDesc for SearchProvider service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SearchProvider_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "qsfera.services.search.v0.SearchProvider",
	HandlerType: (*SearchProviderServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Search",
			Handler:    _SearchProvider_Search_Handler,
		},
		{
			MethodName: "IndexSpace",
			Handler:    _SearchProvider_IndexSpace_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "qsfera/services/search/v0/search.proto",
}

const (
	IndexProvider_Search_FullMethodName = "/qsfera.services.search.v0.IndexProvider/Search"
)

// IndexProviderClient is the client API for IndexProvider 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 IndexProviderClient interface {
	Search(ctx context.Context, in *SearchIndexRequest, opts ...grpc.CallOption) (*SearchIndexResponse, error)
}

type indexProviderClient struct {
	cc grpc.ClientConnInterface
}

func NewIndexProviderClient(cc grpc.ClientConnInterface) IndexProviderClient {
	return &indexProviderClient{cc}
}

func (c *indexProviderClient) Search(ctx context.Context, in *SearchIndexRequest, opts ...grpc.CallOption) (*SearchIndexResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SearchIndexResponse)
	err := c.cc.Invoke(ctx, IndexProvider_Search_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// IndexProviderServer is the server API for IndexProvider service.
// All implementations must embed UnimplementedIndexProviderServer
// for forward compatibility.
type IndexProviderServer interface {
	Search(context.Context, *SearchIndexRequest) (*SearchIndexResponse, error)
	mustEmbedUnimplementedIndexProviderServer()
}

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

func (UnimplementedIndexProviderServer) Search(context.Context, *SearchIndexRequest) (*SearchIndexResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method Search not implemented")
}
func (UnimplementedIndexProviderServer) mustEmbedUnimplementedIndexProviderServer() {}
func (UnimplementedIndexProviderServer) testEmbeddedByValue()                       {}

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

func RegisterIndexProviderServer(s grpc.ServiceRegistrar, srv IndexProviderServer) {
	// If the following call panics, it indicates UnimplementedIndexProviderServer 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(&IndexProvider_ServiceDesc, srv)
}

func _IndexProvider_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SearchIndexRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(IndexProviderServer).Search(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: IndexProvider_Search_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(IndexProviderServer).Search(ctx, req.(*SearchIndexRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// IndexProvider_ServiceDesc is the grpc.ServiceDesc for IndexProvider service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var IndexProvider_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "qsfera.services.search.v0.IndexProvider",
	HandlerType: (*IndexProviderServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Search",
			Handler:    _IndexProvider_Search_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "qsfera/services/search/v0/search.proto",
}
