// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             v3.21.12
// source: v1/ingester/ingester.proto

package ingester

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

const (
	IngesterService_BatchCreateRequestMetadatas_FullMethodName = "/k6.cloud.insights.proto.v1.ingester.IngesterService/BatchCreateRequestMetadatas"
	IngesterService_BatchCreateSpans_FullMethodName            = "/k6.cloud.insights.proto.v1.ingester.IngesterService/BatchCreateSpans"
)

// IngesterServiceClient is the client API for IngesterService 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 IngesterServiceClient interface {
	BatchCreateRequestMetadatas(ctx context.Context, in *BatchCreateRequestMetadatasRequest, opts ...grpc.CallOption) (*BatchCreateRequestMetadatasResponse, error)
	BatchCreateSpans(ctx context.Context, in *BatchCreateSpansRequest, opts ...grpc.CallOption) (*BatchCreateSpansResponse, error)
}

type ingesterServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewIngesterServiceClient(cc grpc.ClientConnInterface) IngesterServiceClient {
	return &ingesterServiceClient{cc}
}

func (c *ingesterServiceClient) BatchCreateRequestMetadatas(ctx context.Context, in *BatchCreateRequestMetadatasRequest, opts ...grpc.CallOption) (*BatchCreateRequestMetadatasResponse, error) {
	out := new(BatchCreateRequestMetadatasResponse)
	err := c.cc.Invoke(ctx, IngesterService_BatchCreateRequestMetadatas_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *ingesterServiceClient) BatchCreateSpans(ctx context.Context, in *BatchCreateSpansRequest, opts ...grpc.CallOption) (*BatchCreateSpansResponse, error) {
	out := new(BatchCreateSpansResponse)
	err := c.cc.Invoke(ctx, IngesterService_BatchCreateSpans_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// IngesterServiceServer is the server API for IngesterService service.
// All implementations must embed UnimplementedIngesterServiceServer
// for forward compatibility
type IngesterServiceServer interface {
	BatchCreateRequestMetadatas(context.Context, *BatchCreateRequestMetadatasRequest) (*BatchCreateRequestMetadatasResponse, error)
	BatchCreateSpans(context.Context, *BatchCreateSpansRequest) (*BatchCreateSpansResponse, error)
	mustEmbedUnimplementedIngesterServiceServer()
}

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

func (UnimplementedIngesterServiceServer) BatchCreateRequestMetadatas(context.Context, *BatchCreateRequestMetadatasRequest) (*BatchCreateRequestMetadatasResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method BatchCreateRequestMetadatas not implemented")
}
func (UnimplementedIngesterServiceServer) BatchCreateSpans(context.Context, *BatchCreateSpansRequest) (*BatchCreateSpansResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method BatchCreateSpans not implemented")
}
func (UnimplementedIngesterServiceServer) mustEmbedUnimplementedIngesterServiceServer() {}

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

func RegisterIngesterServiceServer(s grpc.ServiceRegistrar, srv IngesterServiceServer) {
	s.RegisterService(&IngesterService_ServiceDesc, srv)
}

func _IngesterService_BatchCreateRequestMetadatas_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(BatchCreateRequestMetadatasRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(IngesterServiceServer).BatchCreateRequestMetadatas(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: IngesterService_BatchCreateRequestMetadatas_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(IngesterServiceServer).BatchCreateRequestMetadatas(ctx, req.(*BatchCreateRequestMetadatasRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _IngesterService_BatchCreateSpans_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(BatchCreateSpansRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(IngesterServiceServer).BatchCreateSpans(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: IngesterService_BatchCreateSpans_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(IngesterServiceServer).BatchCreateSpans(ctx, req.(*BatchCreateSpansRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// IngesterService_ServiceDesc is the grpc.ServiceDesc for IngesterService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var IngesterService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "k6.cloud.insights.proto.v1.ingester.IngesterService",
	HandlerType: (*IngesterServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "BatchCreateRequestMetadatas",
			Handler:    _IngesterService_BatchCreateRequestMetadatas_Handler,
		},
		{
			MethodName: "BatchCreateSpans",
			Handler:    _IngesterService_BatchCreateSpans_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "v1/ingester/ingester.proto",
}
