// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc             v3.21.12
// source: yandex/cloud/ai/batch_inference/v1/batch_inference_service.proto

package fomo

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 (
	BatchInferenceService_Describe_FullMethodName = "/yandex.cloud.ai.batch_inference.v1.BatchInferenceService/Describe"
	BatchInferenceService_List_FullMethodName     = "/yandex.cloud.ai.batch_inference.v1.BatchInferenceService/List"
	BatchInferenceService_Cancel_FullMethodName   = "/yandex.cloud.ai.batch_inference.v1.BatchInferenceService/Cancel"
	BatchInferenceService_Delete_FullMethodName   = "/yandex.cloud.ai.batch_inference.v1.BatchInferenceService/Delete"
)

// BatchInferenceServiceClient is the client API for BatchInferenceService 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 BatchInferenceServiceClient interface {
	// Describes a concrete task
	Describe(ctx context.Context, in *DescribeBatchInferenceRequest, opts ...grpc.CallOption) (*DescribeBatchInferenceResponse, error)
	// Lists tasks in folder
	List(ctx context.Context, in *ListBatchInferencesRequest, opts ...grpc.CallOption) (*ListBatchInferencesResponse, error)
	// Cancels a concrete task
	Cancel(ctx context.Context, in *CancelBatchInferenceRequest, opts ...grpc.CallOption) (*CancelBatchInferenceResponse, error)
	// Deletes a concrete task
	Delete(ctx context.Context, in *DeleteBatchInferenceRequest, opts ...grpc.CallOption) (*DeleteBatchInferenceResponse, error)
}

type batchInferenceServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewBatchInferenceServiceClient(cc grpc.ClientConnInterface) BatchInferenceServiceClient {
	return &batchInferenceServiceClient{cc}
}

func (c *batchInferenceServiceClient) Describe(ctx context.Context, in *DescribeBatchInferenceRequest, opts ...grpc.CallOption) (*DescribeBatchInferenceResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DescribeBatchInferenceResponse)
	err := c.cc.Invoke(ctx, BatchInferenceService_Describe_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *batchInferenceServiceClient) List(ctx context.Context, in *ListBatchInferencesRequest, opts ...grpc.CallOption) (*ListBatchInferencesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListBatchInferencesResponse)
	err := c.cc.Invoke(ctx, BatchInferenceService_List_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *batchInferenceServiceClient) Cancel(ctx context.Context, in *CancelBatchInferenceRequest, opts ...grpc.CallOption) (*CancelBatchInferenceResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CancelBatchInferenceResponse)
	err := c.cc.Invoke(ctx, BatchInferenceService_Cancel_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *batchInferenceServiceClient) Delete(ctx context.Context, in *DeleteBatchInferenceRequest, opts ...grpc.CallOption) (*DeleteBatchInferenceResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DeleteBatchInferenceResponse)
	err := c.cc.Invoke(ctx, BatchInferenceService_Delete_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// BatchInferenceServiceServer is the server API for BatchInferenceService service.
// All implementations should embed UnimplementedBatchInferenceServiceServer
// for forward compatibility.
type BatchInferenceServiceServer interface {
	// Describes a concrete task
	Describe(context.Context, *DescribeBatchInferenceRequest) (*DescribeBatchInferenceResponse, error)
	// Lists tasks in folder
	List(context.Context, *ListBatchInferencesRequest) (*ListBatchInferencesResponse, error)
	// Cancels a concrete task
	Cancel(context.Context, *CancelBatchInferenceRequest) (*CancelBatchInferenceResponse, error)
	// Deletes a concrete task
	Delete(context.Context, *DeleteBatchInferenceRequest) (*DeleteBatchInferenceResponse, error)
}

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

func (UnimplementedBatchInferenceServiceServer) Describe(context.Context, *DescribeBatchInferenceRequest) (*DescribeBatchInferenceResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method Describe not implemented")
}
func (UnimplementedBatchInferenceServiceServer) List(context.Context, *ListBatchInferencesRequest) (*ListBatchInferencesResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedBatchInferenceServiceServer) Cancel(context.Context, *CancelBatchInferenceRequest) (*CancelBatchInferenceResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method Cancel not implemented")
}
func (UnimplementedBatchInferenceServiceServer) Delete(context.Context, *DeleteBatchInferenceRequest) (*DeleteBatchInferenceResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedBatchInferenceServiceServer) testEmbeddedByValue() {}

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

func RegisterBatchInferenceServiceServer(s grpc.ServiceRegistrar, srv BatchInferenceServiceServer) {
	// If the following call panics, it indicates UnimplementedBatchInferenceServiceServer 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(&BatchInferenceService_ServiceDesc, srv)
}

func _BatchInferenceService_Describe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DescribeBatchInferenceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BatchInferenceServiceServer).Describe(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BatchInferenceService_Describe_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BatchInferenceServiceServer).Describe(ctx, req.(*DescribeBatchInferenceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BatchInferenceService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListBatchInferencesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BatchInferenceServiceServer).List(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BatchInferenceService_List_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BatchInferenceServiceServer).List(ctx, req.(*ListBatchInferencesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BatchInferenceService_Cancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CancelBatchInferenceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BatchInferenceServiceServer).Cancel(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BatchInferenceService_Cancel_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BatchInferenceServiceServer).Cancel(ctx, req.(*CancelBatchInferenceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BatchInferenceService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteBatchInferenceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BatchInferenceServiceServer).Delete(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BatchInferenceService_Delete_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BatchInferenceServiceServer).Delete(ctx, req.(*DeleteBatchInferenceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// BatchInferenceService_ServiceDesc is the grpc.ServiceDesc for BatchInferenceService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var BatchInferenceService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.ai.batch_inference.v1.BatchInferenceService",
	HandlerType: (*BatchInferenceServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Describe",
			Handler:    _BatchInferenceService_Describe_Handler,
		},
		{
			MethodName: "List",
			Handler:    _BatchInferenceService_List_Handler,
		},
		{
			MethodName: "Cancel",
			Handler:    _BatchInferenceService_Cancel_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _BatchInferenceService_Delete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/ai/batch_inference/v1/batch_inference_service.proto",
}
