// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc             v6.33.1
// source: file.proto

package gen

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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	FileService_GetFile_FullMethodName           = "/proto.FileService/GetFile"
	FileService_GetFileBatch_FullMethodName      = "/proto.FileService/GetFileBatch"
	FileService_UpdateFile_FullMethodName        = "/proto.FileService/UpdateFile"
	FileService_DeleteFile_FullMethodName        = "/proto.FileService/DeleteFile"
	FileService_LoadFromReference_FullMethodName = "/proto.FileService/LoadFromReference"
	FileService_IsReferenced_FullMethodName      = "/proto.FileService/IsReferenced"
	FileService_PurgeCache_FullMethodName        = "/proto.FileService/PurgeCache"
)

// FileServiceClient is the client API for FileService 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.
//
// Service for file operations
type FileServiceClient interface {
	// Get file reference by ID
	GetFile(ctx context.Context, in *GetFileRequest, opts ...grpc.CallOption) (*CloudFile, error)
	GetFileBatch(ctx context.Context, in *GetFileBatchRequest, opts ...grpc.CallOption) (*GetFileBatchResponse, error)
	// Update an existing file reference
	UpdateFile(ctx context.Context, in *UpdateFileRequest, opts ...grpc.CallOption) (*CloudFile, error)
	// Delete a file reference
	DeleteFile(ctx context.Context, in *DeleteFileRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Load files from references
	LoadFromReference(ctx context.Context, in *LoadFromReferenceRequest, opts ...grpc.CallOption) (*LoadFromReferenceResponse, error)
	// Check if a file is referenced by any resource
	IsReferenced(ctx context.Context, in *IsReferencedRequest, opts ...grpc.CallOption) (*IsReferencedResponse, error)
	// Purge cache for a file
	PurgeCache(ctx context.Context, in *PurgeCacheRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

type fileServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewFileServiceClient(cc grpc.ClientConnInterface) FileServiceClient {
	return &fileServiceClient{cc}
}

func (c *fileServiceClient) GetFile(ctx context.Context, in *GetFileRequest, opts ...grpc.CallOption) (*CloudFile, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CloudFile)
	err := c.cc.Invoke(ctx, FileService_GetFile_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *fileServiceClient) GetFileBatch(ctx context.Context, in *GetFileBatchRequest, opts ...grpc.CallOption) (*GetFileBatchResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetFileBatchResponse)
	err := c.cc.Invoke(ctx, FileService_GetFileBatch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *fileServiceClient) UpdateFile(ctx context.Context, in *UpdateFileRequest, opts ...grpc.CallOption) (*CloudFile, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CloudFile)
	err := c.cc.Invoke(ctx, FileService_UpdateFile_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

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

func (c *fileServiceClient) LoadFromReference(ctx context.Context, in *LoadFromReferenceRequest, opts ...grpc.CallOption) (*LoadFromReferenceResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(LoadFromReferenceResponse)
	err := c.cc.Invoke(ctx, FileService_LoadFromReference_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *fileServiceClient) IsReferenced(ctx context.Context, in *IsReferencedRequest, opts ...grpc.CallOption) (*IsReferencedResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(IsReferencedResponse)
	err := c.cc.Invoke(ctx, FileService_IsReferenced_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

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

// FileServiceServer is the server API for FileService service.
// All implementations must embed UnimplementedFileServiceServer
// for forward compatibility.
//
// Service for file operations
type FileServiceServer interface {
	// Get file reference by ID
	GetFile(context.Context, *GetFileRequest) (*CloudFile, error)
	GetFileBatch(context.Context, *GetFileBatchRequest) (*GetFileBatchResponse, error)
	// Update an existing file reference
	UpdateFile(context.Context, *UpdateFileRequest) (*CloudFile, error)
	// Delete a file reference
	DeleteFile(context.Context, *DeleteFileRequest) (*emptypb.Empty, error)
	// Load files from references
	LoadFromReference(context.Context, *LoadFromReferenceRequest) (*LoadFromReferenceResponse, error)
	// Check if a file is referenced by any resource
	IsReferenced(context.Context, *IsReferencedRequest) (*IsReferencedResponse, error)
	// Purge cache for a file
	PurgeCache(context.Context, *PurgeCacheRequest) (*emptypb.Empty, error)
	mustEmbedUnimplementedFileServiceServer()
}

// UnimplementedFileServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedFileServiceServer struct{}

func (UnimplementedFileServiceServer) GetFile(context.Context, *GetFileRequest) (*CloudFile, error) {
	return nil, status.Error(codes.Unimplemented, "method GetFile not implemented")
}
func (UnimplementedFileServiceServer) GetFileBatch(context.Context, *GetFileBatchRequest) (*GetFileBatchResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method GetFileBatch not implemented")
}
func (UnimplementedFileServiceServer) UpdateFile(context.Context, *UpdateFileRequest) (*CloudFile, error) {
	return nil, status.Error(codes.Unimplemented, "method UpdateFile not implemented")
}
func (UnimplementedFileServiceServer) DeleteFile(context.Context, *DeleteFileRequest) (*emptypb.Empty, error) {
	return nil, status.Error(codes.Unimplemented, "method DeleteFile not implemented")
}
func (UnimplementedFileServiceServer) LoadFromReference(context.Context, *LoadFromReferenceRequest) (*LoadFromReferenceResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method LoadFromReference not implemented")
}
func (UnimplementedFileServiceServer) IsReferenced(context.Context, *IsReferencedRequest) (*IsReferencedResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method IsReferenced not implemented")
}
func (UnimplementedFileServiceServer) PurgeCache(context.Context, *PurgeCacheRequest) (*emptypb.Empty, error) {
	return nil, status.Error(codes.Unimplemented, "method PurgeCache not implemented")
}
func (UnimplementedFileServiceServer) mustEmbedUnimplementedFileServiceServer() {}
func (UnimplementedFileServiceServer) testEmbeddedByValue()                     {}

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

func RegisterFileServiceServer(s grpc.ServiceRegistrar, srv FileServiceServer) {
	// If the following call panics, it indicates UnimplementedFileServiceServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&FileService_ServiceDesc, srv)
}

func _FileService_GetFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetFileRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileServiceServer).GetFile(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileService_GetFile_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileServiceServer).GetFile(ctx, req.(*GetFileRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FileService_GetFileBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetFileBatchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileServiceServer).GetFileBatch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileService_GetFileBatch_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileServiceServer).GetFileBatch(ctx, req.(*GetFileBatchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FileService_UpdateFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateFileRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileServiceServer).UpdateFile(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileService_UpdateFile_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileServiceServer).UpdateFile(ctx, req.(*UpdateFileRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FileService_DeleteFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteFileRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileServiceServer).DeleteFile(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileService_DeleteFile_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileServiceServer).DeleteFile(ctx, req.(*DeleteFileRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FileService_LoadFromReference_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(LoadFromReferenceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileServiceServer).LoadFromReference(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileService_LoadFromReference_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileServiceServer).LoadFromReference(ctx, req.(*LoadFromReferenceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FileService_IsReferenced_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(IsReferencedRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileServiceServer).IsReferenced(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileService_IsReferenced_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileServiceServer).IsReferenced(ctx, req.(*IsReferencedRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FileService_PurgeCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PurgeCacheRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileServiceServer).PurgeCache(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileService_PurgeCache_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileServiceServer).PurgeCache(ctx, req.(*PurgeCacheRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// FileService_ServiceDesc is the grpc.ServiceDesc for FileService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FileService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.FileService",
	HandlerType: (*FileServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetFile",
			Handler:    _FileService_GetFile_Handler,
		},
		{
			MethodName: "GetFileBatch",
			Handler:    _FileService_GetFileBatch_Handler,
		},
		{
			MethodName: "UpdateFile",
			Handler:    _FileService_UpdateFile_Handler,
		},
		{
			MethodName: "DeleteFile",
			Handler:    _FileService_DeleteFile_Handler,
		},
		{
			MethodName: "LoadFromReference",
			Handler:    _FileService_LoadFromReference_Handler,
		},
		{
			MethodName: "IsReferenced",
			Handler:    _FileService_IsReferenced_Handler,
		},
		{
			MethodName: "PurgeCache",
			Handler:    _FileService_PurgeCache_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "file.proto",
}

const (
	FileReferenceService_CreateReference_FullMethodName               = "/proto.FileReferenceService/CreateReference"
	FileReferenceService_CreateReferenceBatch_FullMethodName          = "/proto.FileReferenceService/CreateReferenceBatch"
	FileReferenceService_GetReferences_FullMethodName                 = "/proto.FileReferenceService/GetReferences"
	FileReferenceService_GetReferenceCount_FullMethodName             = "/proto.FileReferenceService/GetReferenceCount"
	FileReferenceService_GetResourceReferences_FullMethodName         = "/proto.FileReferenceService/GetResourceReferences"
	FileReferenceService_GetResourceFiles_FullMethodName              = "/proto.FileReferenceService/GetResourceFiles"
	FileReferenceService_DeleteResourceReferences_FullMethodName      = "/proto.FileReferenceService/DeleteResourceReferences"
	FileReferenceService_DeleteResourceReferencesBatch_FullMethodName = "/proto.FileReferenceService/DeleteResourceReferencesBatch"
	FileReferenceService_DeleteReference_FullMethodName               = "/proto.FileReferenceService/DeleteReference"
	FileReferenceService_UpdateResourceFiles_FullMethodName           = "/proto.FileReferenceService/UpdateResourceFiles"
	FileReferenceService_SetReferenceExpiration_FullMethodName        = "/proto.FileReferenceService/SetReferenceExpiration"
	FileReferenceService_SetFileReferencesExpiration_FullMethodName   = "/proto.FileReferenceService/SetFileReferencesExpiration"
	FileReferenceService_HasFileReferences_FullMethodName             = "/proto.FileReferenceService/HasFileReferences"
)

// FileReferenceServiceClient is the client API for FileReferenceService 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.
//
// Service for managing file references
type FileReferenceServiceClient interface {
	// Creates a new reference to a file for a specific resource
	CreateReference(ctx context.Context, in *CreateReferenceRequest, opts ...grpc.CallOption) (*CloudFileReference, error)
	CreateReferenceBatch(ctx context.Context, in *CreateReferenceBatchRequest, opts ...grpc.CallOption) (*CreateReferenceBatchResponse, error)
	// Gets all references to a file
	GetReferences(ctx context.Context, in *GetReferencesRequest, opts ...grpc.CallOption) (*GetReferencesResponse, error)
	// Gets the number of references to a file
	GetReferenceCount(ctx context.Context, in *GetReferenceCountRequest, opts ...grpc.CallOption) (*GetReferenceCountResponse, error)
	// Gets all references for a specific resource and optional usage
	GetResourceReferences(ctx context.Context, in *GetResourceReferencesRequest, opts ...grpc.CallOption) (*GetReferencesResponse, error)
	// Gets all files referenced by a resource with optional usage filter
	GetResourceFiles(ctx context.Context, in *GetResourceFilesRequest, opts ...grpc.CallOption) (*GetResourceFilesResponse, error)
	// Deletes references for a specific resource and optional usage
	DeleteResourceReferences(ctx context.Context, in *DeleteResourceReferencesRequest, opts ...grpc.CallOption) (*DeleteResourceReferencesResponse, error)
	// Deletes references for multiple specific resources and optional usage
	DeleteResourceReferencesBatch(ctx context.Context, in *DeleteResourceReferencesBatchRequest, opts ...grpc.CallOption) (*DeleteResourceReferencesResponse, error)
	// Deletes a specific file reference
	DeleteReference(ctx context.Context, in *DeleteReferenceRequest, opts ...grpc.CallOption) (*DeleteReferenceResponse, error)
	// Updates the files referenced by a resource
	UpdateResourceFiles(ctx context.Context, in *UpdateResourceFilesRequest, opts ...grpc.CallOption) (*UpdateResourceFilesResponse, error)
	// Updates the expiration time for a file reference
	SetReferenceExpiration(ctx context.Context, in *SetReferenceExpirationRequest, opts ...grpc.CallOption) (*SetReferenceExpirationResponse, error)
	// Updates the expiration time for all references to a file
	SetFileReferencesExpiration(ctx context.Context, in *SetFileReferencesExpirationRequest, opts ...grpc.CallOption) (*SetFileReferencesExpirationResponse, error)
	// Checks if a file has any references
	HasFileReferences(ctx context.Context, in *HasFileReferencesRequest, opts ...grpc.CallOption) (*HasFileReferencesResponse, error)
}

type fileReferenceServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewFileReferenceServiceClient(cc grpc.ClientConnInterface) FileReferenceServiceClient {
	return &fileReferenceServiceClient{cc}
}

func (c *fileReferenceServiceClient) CreateReference(ctx context.Context, in *CreateReferenceRequest, opts ...grpc.CallOption) (*CloudFileReference, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CloudFileReference)
	err := c.cc.Invoke(ctx, FileReferenceService_CreateReference_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *fileReferenceServiceClient) CreateReferenceBatch(ctx context.Context, in *CreateReferenceBatchRequest, opts ...grpc.CallOption) (*CreateReferenceBatchResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CreateReferenceBatchResponse)
	err := c.cc.Invoke(ctx, FileReferenceService_CreateReferenceBatch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *fileReferenceServiceClient) GetReferences(ctx context.Context, in *GetReferencesRequest, opts ...grpc.CallOption) (*GetReferencesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetReferencesResponse)
	err := c.cc.Invoke(ctx, FileReferenceService_GetReferences_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *fileReferenceServiceClient) GetReferenceCount(ctx context.Context, in *GetReferenceCountRequest, opts ...grpc.CallOption) (*GetReferenceCountResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetReferenceCountResponse)
	err := c.cc.Invoke(ctx, FileReferenceService_GetReferenceCount_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *fileReferenceServiceClient) GetResourceReferences(ctx context.Context, in *GetResourceReferencesRequest, opts ...grpc.CallOption) (*GetReferencesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetReferencesResponse)
	err := c.cc.Invoke(ctx, FileReferenceService_GetResourceReferences_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *fileReferenceServiceClient) GetResourceFiles(ctx context.Context, in *GetResourceFilesRequest, opts ...grpc.CallOption) (*GetResourceFilesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetResourceFilesResponse)
	err := c.cc.Invoke(ctx, FileReferenceService_GetResourceFiles_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *fileReferenceServiceClient) DeleteResourceReferences(ctx context.Context, in *DeleteResourceReferencesRequest, opts ...grpc.CallOption) (*DeleteResourceReferencesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DeleteResourceReferencesResponse)
	err := c.cc.Invoke(ctx, FileReferenceService_DeleteResourceReferences_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *fileReferenceServiceClient) DeleteResourceReferencesBatch(ctx context.Context, in *DeleteResourceReferencesBatchRequest, opts ...grpc.CallOption) (*DeleteResourceReferencesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DeleteResourceReferencesResponse)
	err := c.cc.Invoke(ctx, FileReferenceService_DeleteResourceReferencesBatch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *fileReferenceServiceClient) DeleteReference(ctx context.Context, in *DeleteReferenceRequest, opts ...grpc.CallOption) (*DeleteReferenceResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DeleteReferenceResponse)
	err := c.cc.Invoke(ctx, FileReferenceService_DeleteReference_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *fileReferenceServiceClient) UpdateResourceFiles(ctx context.Context, in *UpdateResourceFilesRequest, opts ...grpc.CallOption) (*UpdateResourceFilesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(UpdateResourceFilesResponse)
	err := c.cc.Invoke(ctx, FileReferenceService_UpdateResourceFiles_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *fileReferenceServiceClient) SetReferenceExpiration(ctx context.Context, in *SetReferenceExpirationRequest, opts ...grpc.CallOption) (*SetReferenceExpirationResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SetReferenceExpirationResponse)
	err := c.cc.Invoke(ctx, FileReferenceService_SetReferenceExpiration_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *fileReferenceServiceClient) SetFileReferencesExpiration(ctx context.Context, in *SetFileReferencesExpirationRequest, opts ...grpc.CallOption) (*SetFileReferencesExpirationResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SetFileReferencesExpirationResponse)
	err := c.cc.Invoke(ctx, FileReferenceService_SetFileReferencesExpiration_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *fileReferenceServiceClient) HasFileReferences(ctx context.Context, in *HasFileReferencesRequest, opts ...grpc.CallOption) (*HasFileReferencesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(HasFileReferencesResponse)
	err := c.cc.Invoke(ctx, FileReferenceService_HasFileReferences_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// FileReferenceServiceServer is the server API for FileReferenceService service.
// All implementations must embed UnimplementedFileReferenceServiceServer
// for forward compatibility.
//
// Service for managing file references
type FileReferenceServiceServer interface {
	// Creates a new reference to a file for a specific resource
	CreateReference(context.Context, *CreateReferenceRequest) (*CloudFileReference, error)
	CreateReferenceBatch(context.Context, *CreateReferenceBatchRequest) (*CreateReferenceBatchResponse, error)
	// Gets all references to a file
	GetReferences(context.Context, *GetReferencesRequest) (*GetReferencesResponse, error)
	// Gets the number of references to a file
	GetReferenceCount(context.Context, *GetReferenceCountRequest) (*GetReferenceCountResponse, error)
	// Gets all references for a specific resource and optional usage
	GetResourceReferences(context.Context, *GetResourceReferencesRequest) (*GetReferencesResponse, error)
	// Gets all files referenced by a resource with optional usage filter
	GetResourceFiles(context.Context, *GetResourceFilesRequest) (*GetResourceFilesResponse, error)
	// Deletes references for a specific resource and optional usage
	DeleteResourceReferences(context.Context, *DeleteResourceReferencesRequest) (*DeleteResourceReferencesResponse, error)
	// Deletes references for multiple specific resources and optional usage
	DeleteResourceReferencesBatch(context.Context, *DeleteResourceReferencesBatchRequest) (*DeleteResourceReferencesResponse, error)
	// Deletes a specific file reference
	DeleteReference(context.Context, *DeleteReferenceRequest) (*DeleteReferenceResponse, error)
	// Updates the files referenced by a resource
	UpdateResourceFiles(context.Context, *UpdateResourceFilesRequest) (*UpdateResourceFilesResponse, error)
	// Updates the expiration time for a file reference
	SetReferenceExpiration(context.Context, *SetReferenceExpirationRequest) (*SetReferenceExpirationResponse, error)
	// Updates the expiration time for all references to a file
	SetFileReferencesExpiration(context.Context, *SetFileReferencesExpirationRequest) (*SetFileReferencesExpirationResponse, error)
	// Checks if a file has any references
	HasFileReferences(context.Context, *HasFileReferencesRequest) (*HasFileReferencesResponse, error)
	mustEmbedUnimplementedFileReferenceServiceServer()
}

// UnimplementedFileReferenceServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedFileReferenceServiceServer struct{}

func (UnimplementedFileReferenceServiceServer) CreateReference(context.Context, *CreateReferenceRequest) (*CloudFileReference, error) {
	return nil, status.Error(codes.Unimplemented, "method CreateReference not implemented")
}
func (UnimplementedFileReferenceServiceServer) CreateReferenceBatch(context.Context, *CreateReferenceBatchRequest) (*CreateReferenceBatchResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method CreateReferenceBatch not implemented")
}
func (UnimplementedFileReferenceServiceServer) GetReferences(context.Context, *GetReferencesRequest) (*GetReferencesResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method GetReferences not implemented")
}
func (UnimplementedFileReferenceServiceServer) GetReferenceCount(context.Context, *GetReferenceCountRequest) (*GetReferenceCountResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method GetReferenceCount not implemented")
}
func (UnimplementedFileReferenceServiceServer) GetResourceReferences(context.Context, *GetResourceReferencesRequest) (*GetReferencesResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method GetResourceReferences not implemented")
}
func (UnimplementedFileReferenceServiceServer) GetResourceFiles(context.Context, *GetResourceFilesRequest) (*GetResourceFilesResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method GetResourceFiles not implemented")
}
func (UnimplementedFileReferenceServiceServer) DeleteResourceReferences(context.Context, *DeleteResourceReferencesRequest) (*DeleteResourceReferencesResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method DeleteResourceReferences not implemented")
}
func (UnimplementedFileReferenceServiceServer) DeleteResourceReferencesBatch(context.Context, *DeleteResourceReferencesBatchRequest) (*DeleteResourceReferencesResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method DeleteResourceReferencesBatch not implemented")
}
func (UnimplementedFileReferenceServiceServer) DeleteReference(context.Context, *DeleteReferenceRequest) (*DeleteReferenceResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method DeleteReference not implemented")
}
func (UnimplementedFileReferenceServiceServer) UpdateResourceFiles(context.Context, *UpdateResourceFilesRequest) (*UpdateResourceFilesResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method UpdateResourceFiles not implemented")
}
func (UnimplementedFileReferenceServiceServer) SetReferenceExpiration(context.Context, *SetReferenceExpirationRequest) (*SetReferenceExpirationResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method SetReferenceExpiration not implemented")
}
func (UnimplementedFileReferenceServiceServer) SetFileReferencesExpiration(context.Context, *SetFileReferencesExpirationRequest) (*SetFileReferencesExpirationResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method SetFileReferencesExpiration not implemented")
}
func (UnimplementedFileReferenceServiceServer) HasFileReferences(context.Context, *HasFileReferencesRequest) (*HasFileReferencesResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method HasFileReferences not implemented")
}
func (UnimplementedFileReferenceServiceServer) mustEmbedUnimplementedFileReferenceServiceServer() {}
func (UnimplementedFileReferenceServiceServer) testEmbeddedByValue()                              {}

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

func RegisterFileReferenceServiceServer(s grpc.ServiceRegistrar, srv FileReferenceServiceServer) {
	// If the following call panics, it indicates UnimplementedFileReferenceServiceServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&FileReferenceService_ServiceDesc, srv)
}

func _FileReferenceService_CreateReference_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateReferenceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileReferenceServiceServer).CreateReference(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileReferenceService_CreateReference_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileReferenceServiceServer).CreateReference(ctx, req.(*CreateReferenceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FileReferenceService_CreateReferenceBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateReferenceBatchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileReferenceServiceServer).CreateReferenceBatch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileReferenceService_CreateReferenceBatch_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileReferenceServiceServer).CreateReferenceBatch(ctx, req.(*CreateReferenceBatchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FileReferenceService_GetReferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetReferencesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileReferenceServiceServer).GetReferences(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileReferenceService_GetReferences_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileReferenceServiceServer).GetReferences(ctx, req.(*GetReferencesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FileReferenceService_GetReferenceCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetReferenceCountRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileReferenceServiceServer).GetReferenceCount(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileReferenceService_GetReferenceCount_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileReferenceServiceServer).GetReferenceCount(ctx, req.(*GetReferenceCountRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FileReferenceService_GetResourceReferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetResourceReferencesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileReferenceServiceServer).GetResourceReferences(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileReferenceService_GetResourceReferences_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileReferenceServiceServer).GetResourceReferences(ctx, req.(*GetResourceReferencesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FileReferenceService_GetResourceFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetResourceFilesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileReferenceServiceServer).GetResourceFiles(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileReferenceService_GetResourceFiles_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileReferenceServiceServer).GetResourceFiles(ctx, req.(*GetResourceFilesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FileReferenceService_DeleteResourceReferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteResourceReferencesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileReferenceServiceServer).DeleteResourceReferences(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileReferenceService_DeleteResourceReferences_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileReferenceServiceServer).DeleteResourceReferences(ctx, req.(*DeleteResourceReferencesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FileReferenceService_DeleteResourceReferencesBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteResourceReferencesBatchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileReferenceServiceServer).DeleteResourceReferencesBatch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileReferenceService_DeleteResourceReferencesBatch_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileReferenceServiceServer).DeleteResourceReferencesBatch(ctx, req.(*DeleteResourceReferencesBatchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FileReferenceService_DeleteReference_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteReferenceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileReferenceServiceServer).DeleteReference(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileReferenceService_DeleteReference_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileReferenceServiceServer).DeleteReference(ctx, req.(*DeleteReferenceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FileReferenceService_UpdateResourceFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateResourceFilesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileReferenceServiceServer).UpdateResourceFiles(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileReferenceService_UpdateResourceFiles_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileReferenceServiceServer).UpdateResourceFiles(ctx, req.(*UpdateResourceFilesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FileReferenceService_SetReferenceExpiration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SetReferenceExpirationRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileReferenceServiceServer).SetReferenceExpiration(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileReferenceService_SetReferenceExpiration_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileReferenceServiceServer).SetReferenceExpiration(ctx, req.(*SetReferenceExpirationRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FileReferenceService_SetFileReferencesExpiration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SetFileReferencesExpirationRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileReferenceServiceServer).SetFileReferencesExpiration(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileReferenceService_SetFileReferencesExpiration_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileReferenceServiceServer).SetFileReferencesExpiration(ctx, req.(*SetFileReferencesExpirationRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FileReferenceService_HasFileReferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(HasFileReferencesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FileReferenceServiceServer).HasFileReferences(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: FileReferenceService_HasFileReferences_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FileReferenceServiceServer).HasFileReferences(ctx, req.(*HasFileReferencesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// FileReferenceService_ServiceDesc is the grpc.ServiceDesc for FileReferenceService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FileReferenceService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.FileReferenceService",
	HandlerType: (*FileReferenceServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateReference",
			Handler:    _FileReferenceService_CreateReference_Handler,
		},
		{
			MethodName: "CreateReferenceBatch",
			Handler:    _FileReferenceService_CreateReferenceBatch_Handler,
		},
		{
			MethodName: "GetReferences",
			Handler:    _FileReferenceService_GetReferences_Handler,
		},
		{
			MethodName: "GetReferenceCount",
			Handler:    _FileReferenceService_GetReferenceCount_Handler,
		},
		{
			MethodName: "GetResourceReferences",
			Handler:    _FileReferenceService_GetResourceReferences_Handler,
		},
		{
			MethodName: "GetResourceFiles",
			Handler:    _FileReferenceService_GetResourceFiles_Handler,
		},
		{
			MethodName: "DeleteResourceReferences",
			Handler:    _FileReferenceService_DeleteResourceReferences_Handler,
		},
		{
			MethodName: "DeleteResourceReferencesBatch",
			Handler:    _FileReferenceService_DeleteResourceReferencesBatch_Handler,
		},
		{
			MethodName: "DeleteReference",
			Handler:    _FileReferenceService_DeleteReference_Handler,
		},
		{
			MethodName: "UpdateResourceFiles",
			Handler:    _FileReferenceService_UpdateResourceFiles_Handler,
		},
		{
			MethodName: "SetReferenceExpiration",
			Handler:    _FileReferenceService_SetReferenceExpiration_Handler,
		},
		{
			MethodName: "SetFileReferencesExpiration",
			Handler:    _FileReferenceService_SetFileReferencesExpiration_Handler,
		},
		{
			MethodName: "HasFileReferences",
			Handler:    _FileReferenceService_HasFileReferences_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "file.proto",
}
