// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc             (unknown)
// source: tidb_mgmt_service/v1/export.proto

package tidb_mgmt_servicev1

import (
	context "context"
	v1 "github.com/tidbcloud/tidb-management-service/api/spec/global/nextgen/v1"
	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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8

const (
	ExportService_ListExports_FullMethodName  = "/tidb_mgmt_service.v1.ExportService/ListExports"
	ExportService_GetExport_FullMethodName    = "/tidb_mgmt_service.v1.ExportService/GetExport"
	ExportService_CreateExport_FullMethodName = "/tidb_mgmt_service.v1.ExportService/CreateExport"
	ExportService_DeleteExport_FullMethodName = "/tidb_mgmt_service.v1.ExportService/DeleteExport"
	ExportService_CancelExport_FullMethodName = "/tidb_mgmt_service.v1.ExportService/CancelExport"
)

// ExportServiceClient is the client API for ExportService 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 ExportServiceClient interface {
	ListExports(ctx context.Context, in *v1.ListExportsRequest, opts ...grpc.CallOption) (*v1.ListExportsResponse, error)
	GetExport(ctx context.Context, in *v1.GetExportRequest, opts ...grpc.CallOption) (*v1.Export, error)
	CreateExport(ctx context.Context, in *v1.CreateExportRequest, opts ...grpc.CallOption) (*v1.Export, error)
	DeleteExport(ctx context.Context, in *v1.DeleteExportRequest, opts ...grpc.CallOption) (*v1.Export, error)
	CancelExport(ctx context.Context, in *v1.CancelExportRequest, opts ...grpc.CallOption) (*v1.Export, error)
}

type exportServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewExportServiceClient(cc grpc.ClientConnInterface) ExportServiceClient {
	return &exportServiceClient{cc}
}

func (c *exportServiceClient) ListExports(ctx context.Context, in *v1.ListExportsRequest, opts ...grpc.CallOption) (*v1.ListExportsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(v1.ListExportsResponse)
	err := c.cc.Invoke(ctx, ExportService_ListExports_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *exportServiceClient) GetExport(ctx context.Context, in *v1.GetExportRequest, opts ...grpc.CallOption) (*v1.Export, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(v1.Export)
	err := c.cc.Invoke(ctx, ExportService_GetExport_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *exportServiceClient) CreateExport(ctx context.Context, in *v1.CreateExportRequest, opts ...grpc.CallOption) (*v1.Export, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(v1.Export)
	err := c.cc.Invoke(ctx, ExportService_CreateExport_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *exportServiceClient) DeleteExport(ctx context.Context, in *v1.DeleteExportRequest, opts ...grpc.CallOption) (*v1.Export, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(v1.Export)
	err := c.cc.Invoke(ctx, ExportService_DeleteExport_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *exportServiceClient) CancelExport(ctx context.Context, in *v1.CancelExportRequest, opts ...grpc.CallOption) (*v1.Export, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(v1.Export)
	err := c.cc.Invoke(ctx, ExportService_CancelExport_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ExportServiceServer is the server API for ExportService service.
// All implementations should embed UnimplementedExportServiceServer
// for forward compatibility
type ExportServiceServer interface {
	ListExports(context.Context, *v1.ListExportsRequest) (*v1.ListExportsResponse, error)
	GetExport(context.Context, *v1.GetExportRequest) (*v1.Export, error)
	CreateExport(context.Context, *v1.CreateExportRequest) (*v1.Export, error)
	DeleteExport(context.Context, *v1.DeleteExportRequest) (*v1.Export, error)
	CancelExport(context.Context, *v1.CancelExportRequest) (*v1.Export, error)
}

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

func (UnimplementedExportServiceServer) ListExports(context.Context, *v1.ListExportsRequest) (*v1.ListExportsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListExports not implemented")
}
func (UnimplementedExportServiceServer) GetExport(context.Context, *v1.GetExportRequest) (*v1.Export, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetExport not implemented")
}
func (UnimplementedExportServiceServer) CreateExport(context.Context, *v1.CreateExportRequest) (*v1.Export, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateExport not implemented")
}
func (UnimplementedExportServiceServer) DeleteExport(context.Context, *v1.DeleteExportRequest) (*v1.Export, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteExport not implemented")
}
func (UnimplementedExportServiceServer) CancelExport(context.Context, *v1.CancelExportRequest) (*v1.Export, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CancelExport not implemented")
}

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

func RegisterExportServiceServer(s grpc.ServiceRegistrar, srv ExportServiceServer) {
	s.RegisterService(&ExportService_ServiceDesc, srv)
}

func _ExportService_ListExports_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(v1.ListExportsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExportServiceServer).ListExports(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExportService_ListExports_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExportServiceServer).ListExports(ctx, req.(*v1.ListExportsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ExportService_GetExport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(v1.GetExportRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExportServiceServer).GetExport(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExportService_GetExport_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExportServiceServer).GetExport(ctx, req.(*v1.GetExportRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ExportService_CreateExport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(v1.CreateExportRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExportServiceServer).CreateExport(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExportService_CreateExport_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExportServiceServer).CreateExport(ctx, req.(*v1.CreateExportRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ExportService_DeleteExport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(v1.DeleteExportRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExportServiceServer).DeleteExport(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExportService_DeleteExport_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExportServiceServer).DeleteExport(ctx, req.(*v1.DeleteExportRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ExportService_CancelExport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(v1.CancelExportRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExportServiceServer).CancelExport(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExportService_CancelExport_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExportServiceServer).CancelExport(ctx, req.(*v1.CancelExportRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ExportService_ServiceDesc is the grpc.ServiceDesc for ExportService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ExportService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "tidb_mgmt_service.v1.ExportService",
	HandlerType: (*ExportServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListExports",
			Handler:    _ExportService_ListExports_Handler,
		},
		{
			MethodName: "GetExport",
			Handler:    _ExportService_GetExport_Handler,
		},
		{
			MethodName: "CreateExport",
			Handler:    _ExportService_CreateExport_Handler,
		},
		{
			MethodName: "DeleteExport",
			Handler:    _ExportService_DeleteExport_Handler,
		},
		{
			MethodName: "CancelExport",
			Handler:    _ExportService_CancelExport_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "tidb_mgmt_service/v1/export.proto",
}
