Package com.google.genai
Class AsyncFileSearchStores
-
- All Implemented Interfaces:
public final class AsyncFileSearchStoresAsync module of FileSearchStores
-
-
Field Summary
Fields Modifier and Type Field Description public final AsyncDocumentsdocuments
-
Constructor Summary
Constructors Constructor Description AsyncFileSearchStores(ApiClient apiClient)
-
Method Summary
-
-
Constructor Detail
-
AsyncFileSearchStores
AsyncFileSearchStores(ApiClient apiClient)
-
-
Method Detail
-
create
CompletableFuture<FileSearchStore> create(CreateFileSearchStoreConfig config)
-
get
CompletableFuture<FileSearchStore> get(String name, GetFileSearchStoreConfig config)
-
delete
CompletableFuture<Void> delete(String name, DeleteFileSearchStoreConfig config)
-
importFile
CompletableFuture<ImportFileOperation> importFile(String fileSearchStoreName, String fileName, ImportFileConfig config)
-
list
CompletableFuture<AsyncPager<FileSearchStore>> list(ListFileSearchStoresConfig config)
Asynchronously makes an API request to list the available file search stores.
- Parameters:
config- A ListFileSearchStoresConfig for configuring the list request.- Returns:
A CompletableFuture that resolves to a AsyncPager. The AsyncPager has a `forEach` method that can be used to asynchronously process items in the page and automatically query the next page once the current page is exhausted.
-
uploadToFileSearchStore
CompletableFuture<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
CompletableFuture<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
CompletableFuture<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
CompletableFuture<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.
-
-
-
-