// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             (unknown)
// source: flyteidl/service/external_plugin_service.proto

package service

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 (
	ExternalPluginService_CreateTask_FullMethodName = "/flyteidl.service.ExternalPluginService/CreateTask"
	ExternalPluginService_GetTask_FullMethodName    = "/flyteidl.service.ExternalPluginService/GetTask"
	ExternalPluginService_DeleteTask_FullMethodName = "/flyteidl.service.ExternalPluginService/DeleteTask"
)

// ExternalPluginServiceClient is the client API for ExternalPluginService 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 ExternalPluginServiceClient interface {
	// Deprecated: Do not use.
	// Send a task create request to the backend plugin server.
	CreateTask(ctx context.Context, in *TaskCreateRequest, opts ...grpc.CallOption) (*TaskCreateResponse, error)
	// Deprecated: Do not use.
	// Get job status.
	GetTask(ctx context.Context, in *TaskGetRequest, opts ...grpc.CallOption) (*TaskGetResponse, error)
	// Deprecated: Do not use.
	// Delete the task resource.
	DeleteTask(ctx context.Context, in *TaskDeleteRequest, opts ...grpc.CallOption) (*TaskDeleteResponse, error)
}

type externalPluginServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewExternalPluginServiceClient(cc grpc.ClientConnInterface) ExternalPluginServiceClient {
	return &externalPluginServiceClient{cc}
}

// Deprecated: Do not use.
func (c *externalPluginServiceClient) CreateTask(ctx context.Context, in *TaskCreateRequest, opts ...grpc.CallOption) (*TaskCreateResponse, error) {
	out := new(TaskCreateResponse)
	err := c.cc.Invoke(ctx, ExternalPluginService_CreateTask_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Deprecated: Do not use.
func (c *externalPluginServiceClient) GetTask(ctx context.Context, in *TaskGetRequest, opts ...grpc.CallOption) (*TaskGetResponse, error) {
	out := new(TaskGetResponse)
	err := c.cc.Invoke(ctx, ExternalPluginService_GetTask_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Deprecated: Do not use.
func (c *externalPluginServiceClient) DeleteTask(ctx context.Context, in *TaskDeleteRequest, opts ...grpc.CallOption) (*TaskDeleteResponse, error) {
	out := new(TaskDeleteResponse)
	err := c.cc.Invoke(ctx, ExternalPluginService_DeleteTask_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ExternalPluginServiceServer is the server API for ExternalPluginService service.
// All implementations should embed UnimplementedExternalPluginServiceServer
// for forward compatibility
type ExternalPluginServiceServer interface {
	// Deprecated: Do not use.
	// Send a task create request to the backend plugin server.
	CreateTask(context.Context, *TaskCreateRequest) (*TaskCreateResponse, error)
	// Deprecated: Do not use.
	// Get job status.
	GetTask(context.Context, *TaskGetRequest) (*TaskGetResponse, error)
	// Deprecated: Do not use.
	// Delete the task resource.
	DeleteTask(context.Context, *TaskDeleteRequest) (*TaskDeleteResponse, error)
}

// UnimplementedExternalPluginServiceServer should be embedded to have forward compatible implementations.
type UnimplementedExternalPluginServiceServer struct {
}

func (UnimplementedExternalPluginServiceServer) CreateTask(context.Context, *TaskCreateRequest) (*TaskCreateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateTask not implemented")
}
func (UnimplementedExternalPluginServiceServer) GetTask(context.Context, *TaskGetRequest) (*TaskGetResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetTask not implemented")
}
func (UnimplementedExternalPluginServiceServer) DeleteTask(context.Context, *TaskDeleteRequest) (*TaskDeleteResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteTask not implemented")
}

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

func RegisterExternalPluginServiceServer(s grpc.ServiceRegistrar, srv ExternalPluginServiceServer) {
	s.RegisterService(&ExternalPluginService_ServiceDesc, srv)
}

func _ExternalPluginService_CreateTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(TaskCreateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExternalPluginServiceServer).CreateTask(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExternalPluginService_CreateTask_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExternalPluginServiceServer).CreateTask(ctx, req.(*TaskCreateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ExternalPluginService_GetTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(TaskGetRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExternalPluginServiceServer).GetTask(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExternalPluginService_GetTask_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExternalPluginServiceServer).GetTask(ctx, req.(*TaskGetRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ExternalPluginService_DeleteTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(TaskDeleteRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExternalPluginServiceServer).DeleteTask(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExternalPluginService_DeleteTask_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExternalPluginServiceServer).DeleteTask(ctx, req.(*TaskDeleteRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ExternalPluginService_ServiceDesc is the grpc.ServiceDesc for ExternalPluginService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ExternalPluginService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "flyteidl.service.ExternalPluginService",
	HandlerType: (*ExternalPluginServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateTask",
			Handler:    _ExternalPluginService_CreateTask_Handler,
		},
		{
			MethodName: "GetTask",
			Handler:    _ExternalPluginService_GetTask_Handler,
		},
		{
			MethodName: "DeleteTask",
			Handler:    _ExternalPluginService_DeleteTask_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "flyteidl/service/external_plugin_service.proto",
}
