// Code generated by protoc-gen-go-grpc. DO NOT EDIT.

package backup

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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// BackupServiceClient is the client API for BackupService 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 BackupServiceClient interface {
	// 149
	List(ctx context.Context, in *BackupListReq, opts ...grpc.CallOption) (*Backups, error)
	CreateBackupSchedule(ctx context.Context, in *BackupCreateReq, opts ...grpc.CallOption) (*BackupScheduleId, error)
	GetAutoSetting(ctx context.Context, in *AutoBackupSettingReq, opts ...grpc.CallOption) (*AutoBackupSetting, error)
	Delete(ctx context.Context, in *BackupReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Restore(ctx context.Context, in *BackupRestoreReq, opts ...grpc.CallOption) (*RestoreResp, error)
	DeleteDeletedClusterAndBackups(ctx context.Context, in *ClusterIdReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

type backupServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewBackupServiceClient(cc grpc.ClientConnInterface) BackupServiceClient {
	return &backupServiceClient{cc}
}

func (c *backupServiceClient) List(ctx context.Context, in *BackupListReq, opts ...grpc.CallOption) (*Backups, error) {
	out := new(Backups)
	err := c.cc.Invoke(ctx, "/backup.BackupService/List", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *backupServiceClient) CreateBackupSchedule(ctx context.Context, in *BackupCreateReq, opts ...grpc.CallOption) (*BackupScheduleId, error) {
	out := new(BackupScheduleId)
	err := c.cc.Invoke(ctx, "/backup.BackupService/CreateBackupSchedule", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *backupServiceClient) GetAutoSetting(ctx context.Context, in *AutoBackupSettingReq, opts ...grpc.CallOption) (*AutoBackupSetting, error) {
	out := new(AutoBackupSetting)
	err := c.cc.Invoke(ctx, "/backup.BackupService/GetAutoSetting", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *backupServiceClient) Delete(ctx context.Context, in *BackupReq, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, "/backup.BackupService/Delete", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *backupServiceClient) Restore(ctx context.Context, in *BackupRestoreReq, opts ...grpc.CallOption) (*RestoreResp, error) {
	out := new(RestoreResp)
	err := c.cc.Invoke(ctx, "/backup.BackupService/Restore", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *backupServiceClient) DeleteDeletedClusterAndBackups(ctx context.Context, in *ClusterIdReq, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, "/backup.BackupService/DeleteDeletedClusterAndBackups", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// BackupServiceServer is the server API for BackupService service.
// All implementations must embed UnimplementedBackupServiceServer
// for forward compatibility
type BackupServiceServer interface {
	// 149
	List(context.Context, *BackupListReq) (*Backups, error)
	CreateBackupSchedule(context.Context, *BackupCreateReq) (*BackupScheduleId, error)
	GetAutoSetting(context.Context, *AutoBackupSettingReq) (*AutoBackupSetting, error)
	Delete(context.Context, *BackupReq) (*emptypb.Empty, error)
	Restore(context.Context, *BackupRestoreReq) (*RestoreResp, error)
	DeleteDeletedClusterAndBackups(context.Context, *ClusterIdReq) (*emptypb.Empty, error)
	mustEmbedUnimplementedBackupServiceServer()
}

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

func (UnimplementedBackupServiceServer) List(context.Context, *BackupListReq) (*Backups, error) {
	return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedBackupServiceServer) CreateBackupSchedule(context.Context, *BackupCreateReq) (*BackupScheduleId, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateBackupSchedule not implemented")
}
func (UnimplementedBackupServiceServer) GetAutoSetting(context.Context, *AutoBackupSettingReq) (*AutoBackupSetting, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetAutoSetting not implemented")
}
func (UnimplementedBackupServiceServer) Delete(context.Context, *BackupReq) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedBackupServiceServer) Restore(context.Context, *BackupRestoreReq) (*RestoreResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Restore not implemented")
}
func (UnimplementedBackupServiceServer) DeleteDeletedClusterAndBackups(context.Context, *ClusterIdReq) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteDeletedClusterAndBackups not implemented")
}
func (UnimplementedBackupServiceServer) mustEmbedUnimplementedBackupServiceServer() {}

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

func RegisterBackupServiceServer(s grpc.ServiceRegistrar, srv BackupServiceServer) {
	s.RegisterService(&BackupService_ServiceDesc, srv)
}

func _BackupService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(BackupListReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BackupServiceServer).List(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/backup.BackupService/List",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BackupServiceServer).List(ctx, req.(*BackupListReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _BackupService_CreateBackupSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(BackupCreateReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BackupServiceServer).CreateBackupSchedule(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/backup.BackupService/CreateBackupSchedule",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BackupServiceServer).CreateBackupSchedule(ctx, req.(*BackupCreateReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _BackupService_GetAutoSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AutoBackupSettingReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BackupServiceServer).GetAutoSetting(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/backup.BackupService/GetAutoSetting",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BackupServiceServer).GetAutoSetting(ctx, req.(*AutoBackupSettingReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _BackupService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(BackupReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BackupServiceServer).Delete(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/backup.BackupService/Delete",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BackupServiceServer).Delete(ctx, req.(*BackupReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _BackupService_Restore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(BackupRestoreReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BackupServiceServer).Restore(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/backup.BackupService/Restore",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BackupServiceServer).Restore(ctx, req.(*BackupRestoreReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _BackupService_DeleteDeletedClusterAndBackups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ClusterIdReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BackupServiceServer).DeleteDeletedClusterAndBackups(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/backup.BackupService/DeleteDeletedClusterAndBackups",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BackupServiceServer).DeleteDeletedClusterAndBackups(ctx, req.(*ClusterIdReq))
	}
	return interceptor(ctx, in, info, handler)
}

// BackupService_ServiceDesc is the grpc.ServiceDesc for BackupService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var BackupService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "backup.BackupService",
	HandlerType: (*BackupServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "List",
			Handler:    _BackupService_List_Handler,
		},
		{
			MethodName: "CreateBackupSchedule",
			Handler:    _BackupService_CreateBackupSchedule_Handler,
		},
		{
			MethodName: "GetAutoSetting",
			Handler:    _BackupService_GetAutoSetting_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _BackupService_Delete_Handler,
		},
		{
			MethodName: "Restore",
			Handler:    _BackupService_Restore_Handler,
		},
		{
			MethodName: "DeleteDeletedClusterAndBackups",
			Handler:    _BackupService_DeleteDeletedClusterAndBackups_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "components/backup/pkg/service/proto/backup_service.proto",
}
