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

package console

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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8

const (
	BackupRestoreService_ListBackups_FullMethodName                  = "/console.BackupRestoreService/ListBackups"
	BackupRestoreService_GetBackup_FullMethodName                    = "/console.BackupRestoreService/GetBackup"
	BackupRestoreService_ListRecycledInstances_FullMethodName        = "/console.BackupRestoreService/ListRecycledInstances"
	BackupRestoreService_GetRecycledInstance_FullMethodName          = "/console.BackupRestoreService/GetRecycledInstance"
	BackupRestoreService_ListRecycledInstanceBackups_FullMethodName  = "/console.BackupRestoreService/ListRecycledInstanceBackups"
	BackupRestoreService_DeleteRecycledInstanceBackup_FullMethodName = "/console.BackupRestoreService/DeleteRecycledInstanceBackup"
	BackupRestoreService_Restore_FullMethodName                      = "/console.BackupRestoreService/Restore"
	BackupRestoreService_GetBackupRetention_FullMethodName           = "/console.BackupRestoreService/GetBackupRetention"
	BackupRestoreService_GetRestoreProgress_FullMethodName           = "/console.BackupRestoreService/GetRestoreProgress"
)

// BackupRestoreServiceClient is the client API for BackupRestoreService 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.
//
// The BackupRestoreService provides APIs for backup and restore TiDB Serverless clusters.
type BackupRestoreServiceClient interface {
	// Provides a list of backups.
	ListBackups(ctx context.Context, in *ListBackupsRequest, opts ...grpc.CallOption) (*ListBackupsResponse, error)
	// Retrieves details of a specific backup.
	GetBackup(ctx context.Context, in *GetBackupRequest, opts ...grpc.CallOption) (*Backup, error)
	// Lists recycled instances in recycle bin.
	ListRecycledInstances(ctx context.Context, in *ListRecycledInstancesRequest, opts ...grpc.CallOption) (*ListRecycledInstancesResponse, error)
	// Retrieves recycled instance details.
	GetRecycledInstance(ctx context.Context, in *GetRecycledInstanceRequest, opts ...grpc.CallOption) (*RecycledInstance, error)
	// Lists backups of a recycled instance.
	ListRecycledInstanceBackups(ctx context.Context, in *ListRecycledInstanceBackupsRequest, opts ...grpc.CallOption) (*ListRecycledInstanceBackupsResponse, error)
	// Permanently deletes a recycled backup.
	DeleteRecycledInstanceBackup(ctx context.Context, in *DeleteRecycledInstanceBackupRequest, opts ...grpc.CallOption) (*DeleteRecycledInstanceBackupResponse, error)
	Restore(ctx context.Context, in *RestoreRequest, opts ...grpc.CallOption) (*RestoreResponse, error)
	GetBackupRetention(ctx context.Context, in *GetBackupRetentionReq, opts ...grpc.CallOption) (*GetBackupRetentionResp, error)
	// get the progress of the latest restore job
	GetRestoreProgress(ctx context.Context, in *GetRestoreProgressRequest, opts ...grpc.CallOption) (*GetRestoreProgressResponse, error)
}

type backupRestoreServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewBackupRestoreServiceClient(cc grpc.ClientConnInterface) BackupRestoreServiceClient {
	return &backupRestoreServiceClient{cc}
}

func (c *backupRestoreServiceClient) ListBackups(ctx context.Context, in *ListBackupsRequest, opts ...grpc.CallOption) (*ListBackupsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListBackupsResponse)
	err := c.cc.Invoke(ctx, BackupRestoreService_ListBackups_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *backupRestoreServiceClient) GetBackup(ctx context.Context, in *GetBackupRequest, opts ...grpc.CallOption) (*Backup, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(Backup)
	err := c.cc.Invoke(ctx, BackupRestoreService_GetBackup_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *backupRestoreServiceClient) ListRecycledInstances(ctx context.Context, in *ListRecycledInstancesRequest, opts ...grpc.CallOption) (*ListRecycledInstancesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListRecycledInstancesResponse)
	err := c.cc.Invoke(ctx, BackupRestoreService_ListRecycledInstances_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *backupRestoreServiceClient) GetRecycledInstance(ctx context.Context, in *GetRecycledInstanceRequest, opts ...grpc.CallOption) (*RecycledInstance, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RecycledInstance)
	err := c.cc.Invoke(ctx, BackupRestoreService_GetRecycledInstance_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *backupRestoreServiceClient) ListRecycledInstanceBackups(ctx context.Context, in *ListRecycledInstanceBackupsRequest, opts ...grpc.CallOption) (*ListRecycledInstanceBackupsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListRecycledInstanceBackupsResponse)
	err := c.cc.Invoke(ctx, BackupRestoreService_ListRecycledInstanceBackups_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *backupRestoreServiceClient) DeleteRecycledInstanceBackup(ctx context.Context, in *DeleteRecycledInstanceBackupRequest, opts ...grpc.CallOption) (*DeleteRecycledInstanceBackupResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DeleteRecycledInstanceBackupResponse)
	err := c.cc.Invoke(ctx, BackupRestoreService_DeleteRecycledInstanceBackup_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *backupRestoreServiceClient) Restore(ctx context.Context, in *RestoreRequest, opts ...grpc.CallOption) (*RestoreResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RestoreResponse)
	err := c.cc.Invoke(ctx, BackupRestoreService_Restore_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *backupRestoreServiceClient) GetBackupRetention(ctx context.Context, in *GetBackupRetentionReq, opts ...grpc.CallOption) (*GetBackupRetentionResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBackupRetentionResp)
	err := c.cc.Invoke(ctx, BackupRestoreService_GetBackupRetention_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *backupRestoreServiceClient) GetRestoreProgress(ctx context.Context, in *GetRestoreProgressRequest, opts ...grpc.CallOption) (*GetRestoreProgressResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetRestoreProgressResponse)
	err := c.cc.Invoke(ctx, BackupRestoreService_GetRestoreProgress_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// BackupRestoreServiceServer is the server API for BackupRestoreService service.
// All implementations must embed UnimplementedBackupRestoreServiceServer
// for forward compatibility
//
// The BackupRestoreService provides APIs for backup and restore TiDB Serverless clusters.
type BackupRestoreServiceServer interface {
	// Provides a list of backups.
	ListBackups(context.Context, *ListBackupsRequest) (*ListBackupsResponse, error)
	// Retrieves details of a specific backup.
	GetBackup(context.Context, *GetBackupRequest) (*Backup, error)
	// Lists recycled instances in recycle bin.
	ListRecycledInstances(context.Context, *ListRecycledInstancesRequest) (*ListRecycledInstancesResponse, error)
	// Retrieves recycled instance details.
	GetRecycledInstance(context.Context, *GetRecycledInstanceRequest) (*RecycledInstance, error)
	// Lists backups of a recycled instance.
	ListRecycledInstanceBackups(context.Context, *ListRecycledInstanceBackupsRequest) (*ListRecycledInstanceBackupsResponse, error)
	// Permanently deletes a recycled backup.
	DeleteRecycledInstanceBackup(context.Context, *DeleteRecycledInstanceBackupRequest) (*DeleteRecycledInstanceBackupResponse, error)
	Restore(context.Context, *RestoreRequest) (*RestoreResponse, error)
	GetBackupRetention(context.Context, *GetBackupRetentionReq) (*GetBackupRetentionResp, error)
	// get the progress of the latest restore job
	GetRestoreProgress(context.Context, *GetRestoreProgressRequest) (*GetRestoreProgressResponse, error)
	mustEmbedUnimplementedBackupRestoreServiceServer()
}

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

func (UnimplementedBackupRestoreServiceServer) ListBackups(context.Context, *ListBackupsRequest) (*ListBackupsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListBackups not implemented")
}
func (UnimplementedBackupRestoreServiceServer) GetBackup(context.Context, *GetBackupRequest) (*Backup, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBackup not implemented")
}
func (UnimplementedBackupRestoreServiceServer) ListRecycledInstances(context.Context, *ListRecycledInstancesRequest) (*ListRecycledInstancesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListRecycledInstances not implemented")
}
func (UnimplementedBackupRestoreServiceServer) GetRecycledInstance(context.Context, *GetRecycledInstanceRequest) (*RecycledInstance, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetRecycledInstance not implemented")
}
func (UnimplementedBackupRestoreServiceServer) ListRecycledInstanceBackups(context.Context, *ListRecycledInstanceBackupsRequest) (*ListRecycledInstanceBackupsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListRecycledInstanceBackups not implemented")
}
func (UnimplementedBackupRestoreServiceServer) DeleteRecycledInstanceBackup(context.Context, *DeleteRecycledInstanceBackupRequest) (*DeleteRecycledInstanceBackupResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteRecycledInstanceBackup not implemented")
}
func (UnimplementedBackupRestoreServiceServer) Restore(context.Context, *RestoreRequest) (*RestoreResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Restore not implemented")
}
func (UnimplementedBackupRestoreServiceServer) GetBackupRetention(context.Context, *GetBackupRetentionReq) (*GetBackupRetentionResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBackupRetention not implemented")
}
func (UnimplementedBackupRestoreServiceServer) GetRestoreProgress(context.Context, *GetRestoreProgressRequest) (*GetRestoreProgressResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetRestoreProgress not implemented")
}
func (UnimplementedBackupRestoreServiceServer) mustEmbedUnimplementedBackupRestoreServiceServer() {}

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

func RegisterBackupRestoreServiceServer(s grpc.ServiceRegistrar, srv BackupRestoreServiceServer) {
	s.RegisterService(&BackupRestoreService_ServiceDesc, srv)
}

func _BackupRestoreService_ListBackups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListBackupsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BackupRestoreServiceServer).ListBackups(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BackupRestoreService_ListBackups_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BackupRestoreServiceServer).ListBackups(ctx, req.(*ListBackupsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BackupRestoreService_GetBackup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBackupRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BackupRestoreServiceServer).GetBackup(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BackupRestoreService_GetBackup_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BackupRestoreServiceServer).GetBackup(ctx, req.(*GetBackupRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BackupRestoreService_ListRecycledInstances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListRecycledInstancesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BackupRestoreServiceServer).ListRecycledInstances(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BackupRestoreService_ListRecycledInstances_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BackupRestoreServiceServer).ListRecycledInstances(ctx, req.(*ListRecycledInstancesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BackupRestoreService_GetRecycledInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetRecycledInstanceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BackupRestoreServiceServer).GetRecycledInstance(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BackupRestoreService_GetRecycledInstance_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BackupRestoreServiceServer).GetRecycledInstance(ctx, req.(*GetRecycledInstanceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BackupRestoreService_ListRecycledInstanceBackups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListRecycledInstanceBackupsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BackupRestoreServiceServer).ListRecycledInstanceBackups(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BackupRestoreService_ListRecycledInstanceBackups_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BackupRestoreServiceServer).ListRecycledInstanceBackups(ctx, req.(*ListRecycledInstanceBackupsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BackupRestoreService_DeleteRecycledInstanceBackup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteRecycledInstanceBackupRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BackupRestoreServiceServer).DeleteRecycledInstanceBackup(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BackupRestoreService_DeleteRecycledInstanceBackup_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BackupRestoreServiceServer).DeleteRecycledInstanceBackup(ctx, req.(*DeleteRecycledInstanceBackupRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BackupRestoreService_Restore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RestoreRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BackupRestoreServiceServer).Restore(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BackupRestoreService_Restore_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BackupRestoreServiceServer).Restore(ctx, req.(*RestoreRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BackupRestoreService_GetBackupRetention_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBackupRetentionReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BackupRestoreServiceServer).GetBackupRetention(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BackupRestoreService_GetBackupRetention_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BackupRestoreServiceServer).GetBackupRetention(ctx, req.(*GetBackupRetentionReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _BackupRestoreService_GetRestoreProgress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetRestoreProgressRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BackupRestoreServiceServer).GetRestoreProgress(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BackupRestoreService_GetRestoreProgress_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BackupRestoreServiceServer).GetRestoreProgress(ctx, req.(*GetRestoreProgressRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// BackupRestoreService_ServiceDesc is the grpc.ServiceDesc for BackupRestoreService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var BackupRestoreService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "console.BackupRestoreService",
	HandlerType: (*BackupRestoreServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListBackups",
			Handler:    _BackupRestoreService_ListBackups_Handler,
		},
		{
			MethodName: "GetBackup",
			Handler:    _BackupRestoreService_GetBackup_Handler,
		},
		{
			MethodName: "ListRecycledInstances",
			Handler:    _BackupRestoreService_ListRecycledInstances_Handler,
		},
		{
			MethodName: "GetRecycledInstance",
			Handler:    _BackupRestoreService_GetRecycledInstance_Handler,
		},
		{
			MethodName: "ListRecycledInstanceBackups",
			Handler:    _BackupRestoreService_ListRecycledInstanceBackups_Handler,
		},
		{
			MethodName: "DeleteRecycledInstanceBackup",
			Handler:    _BackupRestoreService_DeleteRecycledInstanceBackup_Handler,
		},
		{
			MethodName: "Restore",
			Handler:    _BackupRestoreService_Restore_Handler,
		},
		{
			MethodName: "GetBackupRetention",
			Handler:    _BackupRestoreService_GetBackupRetention_Handler,
		},
		{
			MethodName: "GetRestoreProgress",
			Handler:    _BackupRestoreService_GetRestoreProgress_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "console/br.proto",
}
