Files

public final class Files

Provides methods for interacting with the available GenAI files. Instantiating this class is not required. After instantiating a Client, access methods through `client.files.methodName(...)` directly.

Constructors

Link copied to clipboard
public void Files(ApiClient apiClient)

Functions

Link copied to clipboard
Deletes a remotely stored file.
Link copied to clipboard
public void download(File file, String downloadPath, DownloadFileConfig config)
public void download(String fileName, String downloadPath, DownloadFileConfig config)
Downloads a file from the API.
public void download(GeneratedVideo generatedVideo, String downloadPath, DownloadFileConfig config)
Downloads a generated video from the API.
public void download(Video video, String downloadPath, DownloadFileConfig config)
Downloads a video from the API.
Link copied to clipboard
public File get(String name, GetFileConfig config)
Retrieves the file information from the service.
Link copied to clipboard
public Pager<File> list(ListFilesConfig config)
Makes an API request to list the available files.
Link copied to clipboard
public RegisterFilesResponse registerFiles(GoogleCredentials credentials, List<String> uris, RegisterFilesConfig config)
Registers Google Cloud Storage files for use with the API.
Link copied to clipboard
public File upload(Array<byte> bytes, UploadFileConfig config)
public File upload(File file, UploadFileConfig config)
public File upload(String filePath, UploadFileConfig config)
public File upload(InputStream inputStream, long size, UploadFileConfig config)
Uploads a file to the API.