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

package rpc

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_ListBackupPolicies_FullMethodName = "/rpc.BackupRestoreService/ListBackupPolicies"
	BackupRestoreService_UpdateBackupPolicy_FullMethodName = "/rpc.BackupRestoreService/UpdateBackupPolicy"
)

// 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.
type BackupRestoreServiceClient interface {
	// ListBackupPolicies will return at most one item now
	ListBackupPolicies(ctx context.Context, in *ListBackupPoliciesRequest, opts ...grpc.CallOption) (*ListBackupPoliciesResponse, error)
	UpdateBackupPolicy(ctx context.Context, in *UpdateBackupPolicyRequest, opts ...grpc.CallOption) (*BackupPolicy, error)
}

type backupRestoreServiceClient struct {
	cc grpc.ClientConnInterface
}

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

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

func (c *backupRestoreServiceClient) UpdateBackupPolicy(ctx context.Context, in *UpdateBackupPolicyRequest, opts ...grpc.CallOption) (*BackupPolicy, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(BackupPolicy)
	err := c.cc.Invoke(ctx, BackupRestoreService_UpdateBackupPolicy_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
type BackupRestoreServiceServer interface {
	// ListBackupPolicies will return at most one item now
	ListBackupPolicies(context.Context, *ListBackupPoliciesRequest) (*ListBackupPoliciesResponse, error)
	UpdateBackupPolicy(context.Context, *UpdateBackupPolicyRequest) (*BackupPolicy, error)
	mustEmbedUnimplementedBackupRestoreServiceServer()
}

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

func (UnimplementedBackupRestoreServiceServer) ListBackupPolicies(context.Context, *ListBackupPoliciesRequest) (*ListBackupPoliciesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListBackupPolicies not implemented")
}
func (UnimplementedBackupRestoreServiceServer) UpdateBackupPolicy(context.Context, *UpdateBackupPolicyRequest) (*BackupPolicy, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateBackupPolicy 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_ListBackupPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListBackupPoliciesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BackupRestoreServiceServer).ListBackupPolicies(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BackupRestoreService_ListBackupPolicies_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BackupRestoreServiceServer).ListBackupPolicies(ctx, req.(*ListBackupPoliciesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BackupRestoreService_UpdateBackupPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateBackupPolicyRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BackupRestoreServiceServer).UpdateBackupPolicy(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BackupRestoreService_UpdateBackupPolicy_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BackupRestoreServiceServer).UpdateBackupPolicy(ctx, req.(*UpdateBackupPolicyRequest))
	}
	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: "rpc.BackupRestoreService",
	HandlerType: (*BackupRestoreServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListBackupPolicies",
			Handler:    _BackupRestoreService_ListBackupPolicies_Handler,
		},
		{
			MethodName: "UpdateBackupPolicy",
			Handler:    _BackupRestoreService_UpdateBackupPolicy_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "rpc/backup.proto",
}
