Package com.google.genai
Class FileSearchStores
-
- All Implemented Interfaces:
public final class FileSearchStores
-
-
Constructor Summary
Constructors Constructor Description FileSearchStores(ApiClient apiClient)
-
Method Summary
-
-
Constructor Detail
-
FileSearchStores
FileSearchStores(ApiClient apiClient)
-
-
Method Detail
-
create
FileSearchStore create(CreateFileSearchStoreConfig config)
-
get
FileSearchStore get(String name, GetFileSearchStoreConfig config)
-
delete
void delete(String name, DeleteFileSearchStoreConfig config)
-
importFile
ImportFileOperation importFile(String fileSearchStoreName, String fileName, ImportFileConfig config)
-
list
Pager<FileSearchStore> list(ListFileSearchStoresConfig config)
Makes an API request to list the available file search stores.
- Parameters:
config- A ListFileSearchStoresConfig for configuring the list request.- Returns:
A Pager object that contains the list of file search stores. The pager is an iterable and automatically queries the next page once the current page is exhausted.
-
uploadToFileSearchStore
UploadToFileSearchStoreOperation uploadToFileSearchStore(String fileSearchStoreName, File file, UploadToFileSearchStoreConfig config)
Uploads a file to the file search store.
- Parameters:
fileSearchStoreName- The name of the file search store to upload to.file- The file to upload.config- The configuration for the upload.- Returns:
The long running operation of uploading.
-
uploadToFileSearchStore
UploadToFileSearchStoreOperation uploadToFileSearchStore(String fileSearchStoreName, Array<byte> bytes, UploadToFileSearchStoreConfig config)
Uploads a file in bytes format to the file search store.
- Parameters:
fileSearchStoreName- The name of the file search store to upload to.bytes- The bytes of the file to upload.config- The configuration for the upload.- Returns:
The long running operation of uploading.
-
uploadToFileSearchStore
UploadToFileSearchStoreOperation uploadToFileSearchStore(String fileSearchStoreName, InputStream inputStream, long size, UploadToFileSearchStoreConfig config)
Uploads a file as input stream to the API.
- Parameters:
fileSearchStoreName- The name of the file search store to upload to.inputStream- The input stream of the file to upload.size- The size of the file to upload.config- The configuration for the upload.- Returns:
The uploaded file.
-
uploadToFileSearchStore
UploadToFileSearchStoreOperation uploadToFileSearchStore(String fileSearchStoreName, String filePath, UploadToFileSearchStoreConfig config)
Uploads a file to the API.
- Parameters:
fileSearchStoreName- The name of the file search store to upload to.filePath- The path of the file to upload.config- The configuration for the upload.- Returns:
The uploaded file.
-
-
-
-