// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc             (unknown)
// source: runtime/v1/query.proto

package runtimev1

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 (
	RecordQueryService_QueryRecords_FullMethodName = "/nexuscrm.runtime.v1.RecordQueryService/QueryRecords"
	RecordQueryService_QueryHistory_FullMethodName = "/nexuscrm.runtime.v1.RecordQueryService/QueryHistory"
)

// RecordQueryServiceClient is the client API for RecordQueryService 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.
//
// RecordQueryService executes one bounded, already-parsed neutral records
// query. External query grammar, cursors and product response envelopes remain
// caller-owned and never cross this boundary.
type RecordQueryServiceClient interface {
	QueryRecords(ctx context.Context, in *QueryRecordsRequest, opts ...grpc.CallOption) (*QueryRecordsResponse, error)
	QueryHistory(ctx context.Context, in *QueryHistoryRequest, opts ...grpc.CallOption) (*QueryHistoryResponse, error)
}

type recordQueryServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewRecordQueryServiceClient(cc grpc.ClientConnInterface) RecordQueryServiceClient {
	return &recordQueryServiceClient{cc}
}

func (c *recordQueryServiceClient) QueryRecords(ctx context.Context, in *QueryRecordsRequest, opts ...grpc.CallOption) (*QueryRecordsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(QueryRecordsResponse)
	err := c.cc.Invoke(ctx, RecordQueryService_QueryRecords_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *recordQueryServiceClient) QueryHistory(ctx context.Context, in *QueryHistoryRequest, opts ...grpc.CallOption) (*QueryHistoryResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(QueryHistoryResponse)
	err := c.cc.Invoke(ctx, RecordQueryService_QueryHistory_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// RecordQueryServiceServer is the server API for RecordQueryService service.
// All implementations must embed UnimplementedRecordQueryServiceServer
// for forward compatibility.
//
// RecordQueryService executes one bounded, already-parsed neutral records
// query. External query grammar, cursors and product response envelopes remain
// caller-owned and never cross this boundary.
type RecordQueryServiceServer interface {
	QueryRecords(context.Context, *QueryRecordsRequest) (*QueryRecordsResponse, error)
	QueryHistory(context.Context, *QueryHistoryRequest) (*QueryHistoryResponse, error)
	mustEmbedUnimplementedRecordQueryServiceServer()
}

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

func (UnimplementedRecordQueryServiceServer) QueryRecords(context.Context, *QueryRecordsRequest) (*QueryRecordsResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method QueryRecords not implemented")
}
func (UnimplementedRecordQueryServiceServer) QueryHistory(context.Context, *QueryHistoryRequest) (*QueryHistoryResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method QueryHistory not implemented")
}
func (UnimplementedRecordQueryServiceServer) mustEmbedUnimplementedRecordQueryServiceServer() {}
func (UnimplementedRecordQueryServiceServer) testEmbeddedByValue()                            {}

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

func RegisterRecordQueryServiceServer(s grpc.ServiceRegistrar, srv RecordQueryServiceServer) {
	// If the following call panics, it indicates UnimplementedRecordQueryServiceServer 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(&RecordQueryService_ServiceDesc, srv)
}

func _RecordQueryService_QueryRecords_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryRecordsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RecordQueryServiceServer).QueryRecords(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RecordQueryService_QueryRecords_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RecordQueryServiceServer).QueryRecords(ctx, req.(*QueryRecordsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RecordQueryService_QueryHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryHistoryRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RecordQueryServiceServer).QueryHistory(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RecordQueryService_QueryHistory_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RecordQueryServiceServer).QueryHistory(ctx, req.(*QueryHistoryRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// RecordQueryService_ServiceDesc is the grpc.ServiceDesc for RecordQueryService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RecordQueryService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "nexuscrm.runtime.v1.RecordQueryService",
	HandlerType: (*RecordQueryServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "QueryRecords",
			Handler:    _RecordQueryService_QueryRecords_Handler,
		},
		{
			MethodName: "QueryHistory",
			Handler:    _RecordQueryService_QueryHistory_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "runtime/v1/query.proto",
}
