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

package v1beta1

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
)

// 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 (
	MigrationService_CreateMigration_FullMethodName = "/v1beta1.MigrationService/CreateMigration"
	MigrationService_GetMigration_FullMethodName    = "/v1beta1.MigrationService/GetMigration"
	MigrationService_ListMigrations_FullMethodName  = "/v1beta1.MigrationService/ListMigrations"
	MigrationService_DeleteMigration_FullMethodName = "/v1beta1.MigrationService/DeleteMigration"
	MigrationService_PauseMigration_FullMethodName  = "/v1beta1.MigrationService/PauseMigration"
	MigrationService_ResumeMigration_FullMethodName = "/v1beta1.MigrationService/ResumeMigration"
	MigrationService_Precheck_FullMethodName        = "/v1beta1.MigrationService/Precheck"
	MigrationService_CancelPrecheck_FullMethodName  = "/v1beta1.MigrationService/CancelPrecheck"
	MigrationService_GetPrecheck_FullMethodName     = "/v1beta1.MigrationService/GetPrecheck"
)

// MigrationServiceClient is the client API for MigrationService 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 MigrationServiceClient interface {
	// Create a migration
	CreateMigration(ctx context.Context, in *CreateMigrationReq, opts ...grpc.CallOption) (*Migration, error)
	// Get a migration
	GetMigration(ctx context.Context, in *GetMigrationReq, opts ...grpc.CallOption) (*Migration, error)
	// List migrations
	ListMigrations(ctx context.Context, in *ListMigrationsReq, opts ...grpc.CallOption) (*ListMigrationsResp, error)
	// Delete a migration
	DeleteMigration(ctx context.Context, in *DeleteMigrationReq, opts ...grpc.CallOption) (*Migration, error)
	// Pause a running migration
	PauseMigration(ctx context.Context, in *PauseMigrationReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Resume a paused migration
	ResumeMigration(ctx context.Context, in *ResumeMigrationReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Run a precheck for a migration
	Precheck(ctx context.Context, in *CreateMigrationReq, opts ...grpc.CallOption) (*CreateMigrationPrecheckResp, error)
	// Cancel a migration precheck
	CancelPrecheck(ctx context.Context, in *CancelMigrationPrecheckReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Get a migration precheck
	GetPrecheck(ctx context.Context, in *GetMigrationPrecheckReq, opts ...grpc.CallOption) (*MigrationPrecheck, error)
}

type migrationServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewMigrationServiceClient(cc grpc.ClientConnInterface) MigrationServiceClient {
	return &migrationServiceClient{cc}
}

func (c *migrationServiceClient) CreateMigration(ctx context.Context, in *CreateMigrationReq, opts ...grpc.CallOption) (*Migration, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(Migration)
	err := c.cc.Invoke(ctx, MigrationService_CreateMigration_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *migrationServiceClient) GetMigration(ctx context.Context, in *GetMigrationReq, opts ...grpc.CallOption) (*Migration, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(Migration)
	err := c.cc.Invoke(ctx, MigrationService_GetMigration_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *migrationServiceClient) ListMigrations(ctx context.Context, in *ListMigrationsReq, opts ...grpc.CallOption) (*ListMigrationsResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListMigrationsResp)
	err := c.cc.Invoke(ctx, MigrationService_ListMigrations_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *migrationServiceClient) DeleteMigration(ctx context.Context, in *DeleteMigrationReq, opts ...grpc.CallOption) (*Migration, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(Migration)
	err := c.cc.Invoke(ctx, MigrationService_DeleteMigration_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *migrationServiceClient) PauseMigration(ctx context.Context, in *PauseMigrationReq, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, MigrationService_PauseMigration_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *migrationServiceClient) ResumeMigration(ctx context.Context, in *ResumeMigrationReq, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, MigrationService_ResumeMigration_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *migrationServiceClient) Precheck(ctx context.Context, in *CreateMigrationReq, opts ...grpc.CallOption) (*CreateMigrationPrecheckResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CreateMigrationPrecheckResp)
	err := c.cc.Invoke(ctx, MigrationService_Precheck_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *migrationServiceClient) CancelPrecheck(ctx context.Context, in *CancelMigrationPrecheckReq, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, MigrationService_CancelPrecheck_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *migrationServiceClient) GetPrecheck(ctx context.Context, in *GetMigrationPrecheckReq, opts ...grpc.CallOption) (*MigrationPrecheck, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(MigrationPrecheck)
	err := c.cc.Invoke(ctx, MigrationService_GetPrecheck_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// MigrationServiceServer is the server API for MigrationService service.
// All implementations must embed UnimplementedMigrationServiceServer
// for forward compatibility
type MigrationServiceServer interface {
	// Create a migration
	CreateMigration(context.Context, *CreateMigrationReq) (*Migration, error)
	// Get a migration
	GetMigration(context.Context, *GetMigrationReq) (*Migration, error)
	// List migrations
	ListMigrations(context.Context, *ListMigrationsReq) (*ListMigrationsResp, error)
	// Delete a migration
	DeleteMigration(context.Context, *DeleteMigrationReq) (*Migration, error)
	// Pause a running migration
	PauseMigration(context.Context, *PauseMigrationReq) (*emptypb.Empty, error)
	// Resume a paused migration
	ResumeMigration(context.Context, *ResumeMigrationReq) (*emptypb.Empty, error)
	// Run a precheck for a migration
	Precheck(context.Context, *CreateMigrationReq) (*CreateMigrationPrecheckResp, error)
	// Cancel a migration precheck
	CancelPrecheck(context.Context, *CancelMigrationPrecheckReq) (*emptypb.Empty, error)
	// Get a migration precheck
	GetPrecheck(context.Context, *GetMigrationPrecheckReq) (*MigrationPrecheck, error)
	mustEmbedUnimplementedMigrationServiceServer()
}

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

func (UnimplementedMigrationServiceServer) CreateMigration(context.Context, *CreateMigrationReq) (*Migration, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateMigration not implemented")
}
func (UnimplementedMigrationServiceServer) GetMigration(context.Context, *GetMigrationReq) (*Migration, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetMigration not implemented")
}
func (UnimplementedMigrationServiceServer) ListMigrations(context.Context, *ListMigrationsReq) (*ListMigrationsResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListMigrations not implemented")
}
func (UnimplementedMigrationServiceServer) DeleteMigration(context.Context, *DeleteMigrationReq) (*Migration, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteMigration not implemented")
}
func (UnimplementedMigrationServiceServer) PauseMigration(context.Context, *PauseMigrationReq) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method PauseMigration not implemented")
}
func (UnimplementedMigrationServiceServer) ResumeMigration(context.Context, *ResumeMigrationReq) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ResumeMigration not implemented")
}
func (UnimplementedMigrationServiceServer) Precheck(context.Context, *CreateMigrationReq) (*CreateMigrationPrecheckResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Precheck not implemented")
}
func (UnimplementedMigrationServiceServer) CancelPrecheck(context.Context, *CancelMigrationPrecheckReq) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CancelPrecheck not implemented")
}
func (UnimplementedMigrationServiceServer) GetPrecheck(context.Context, *GetMigrationPrecheckReq) (*MigrationPrecheck, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetPrecheck not implemented")
}
func (UnimplementedMigrationServiceServer) mustEmbedUnimplementedMigrationServiceServer() {}

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

func RegisterMigrationServiceServer(s grpc.ServiceRegistrar, srv MigrationServiceServer) {
	s.RegisterService(&MigrationService_ServiceDesc, srv)
}

func _MigrationService_CreateMigration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateMigrationReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MigrationServiceServer).CreateMigration(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: MigrationService_CreateMigration_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MigrationServiceServer).CreateMigration(ctx, req.(*CreateMigrationReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _MigrationService_GetMigration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetMigrationReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MigrationServiceServer).GetMigration(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: MigrationService_GetMigration_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MigrationServiceServer).GetMigration(ctx, req.(*GetMigrationReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _MigrationService_ListMigrations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListMigrationsReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MigrationServiceServer).ListMigrations(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: MigrationService_ListMigrations_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MigrationServiceServer).ListMigrations(ctx, req.(*ListMigrationsReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _MigrationService_DeleteMigration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteMigrationReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MigrationServiceServer).DeleteMigration(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: MigrationService_DeleteMigration_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MigrationServiceServer).DeleteMigration(ctx, req.(*DeleteMigrationReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _MigrationService_PauseMigration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PauseMigrationReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MigrationServiceServer).PauseMigration(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: MigrationService_PauseMigration_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MigrationServiceServer).PauseMigration(ctx, req.(*PauseMigrationReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _MigrationService_ResumeMigration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ResumeMigrationReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MigrationServiceServer).ResumeMigration(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: MigrationService_ResumeMigration_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MigrationServiceServer).ResumeMigration(ctx, req.(*ResumeMigrationReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _MigrationService_Precheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateMigrationReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MigrationServiceServer).Precheck(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: MigrationService_Precheck_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MigrationServiceServer).Precheck(ctx, req.(*CreateMigrationReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _MigrationService_CancelPrecheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CancelMigrationPrecheckReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MigrationServiceServer).CancelPrecheck(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: MigrationService_CancelPrecheck_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MigrationServiceServer).CancelPrecheck(ctx, req.(*CancelMigrationPrecheckReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _MigrationService_GetPrecheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetMigrationPrecheckReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MigrationServiceServer).GetPrecheck(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: MigrationService_GetPrecheck_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MigrationServiceServer).GetPrecheck(ctx, req.(*GetMigrationPrecheckReq))
	}
	return interceptor(ctx, in, info, handler)
}

// MigrationService_ServiceDesc is the grpc.ServiceDesc for MigrationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var MigrationService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "v1beta1.MigrationService",
	HandlerType: (*MigrationServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateMigration",
			Handler:    _MigrationService_CreateMigration_Handler,
		},
		{
			MethodName: "GetMigration",
			Handler:    _MigrationService_GetMigration_Handler,
		},
		{
			MethodName: "ListMigrations",
			Handler:    _MigrationService_ListMigrations_Handler,
		},
		{
			MethodName: "DeleteMigration",
			Handler:    _MigrationService_DeleteMigration_Handler,
		},
		{
			MethodName: "PauseMigration",
			Handler:    _MigrationService_PauseMigration_Handler,
		},
		{
			MethodName: "ResumeMigration",
			Handler:    _MigrationService_ResumeMigration_Handler,
		},
		{
			MethodName: "Precheck",
			Handler:    _MigrationService_Precheck_Handler,
		},
		{
			MethodName: "CancelPrecheck",
			Handler:    _MigrationService_CancelPrecheck_Handler,
		},
		{
			MethodName: "GetPrecheck",
			Handler:    _MigrationService_GetPrecheck_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "v1beta1/dm.proto",
}
