Package com.google.genai
Class ReplayApiClient
-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
@InternalApi() public final class ReplayApiClient extends ApiClient
Base client for the HTTP APIs.
-
-
Constructor Summary
Constructors Constructor Description ReplayApiClient(Optional<String> apiKey, Optional<HttpOptions> httpOptions, Optional<ClientOptions> clientOptions, String replaysDirectory, String replayId, String clientMode)Constructs an ApiClient for Google AI APIs. ReplayApiClient(Optional<String> apiKey, Optional<String> project, Optional<String> location, Optional<GoogleCredentials> credentials, Optional<HttpOptions> httpOptions, Optional<ClientOptions> clientOptions, String replaysDirectory, String replayId, String clientMode)Constructs an ApiClient for Vertex AI APIs.
-
Method Summary
Modifier and Type Method Description voidinitializeReplaySession(String replayId)Initializes the replay session. ApiResponserequest(String httpMethod, String path, String requestJson, Optional<HttpOptions> httpOptions)Sends a Http Post request given the path and request json string. ApiResponserequest(String httpMethod, String path, Array<byte> requestBytes, Optional<HttpOptions> httpOptions)Sends a Http request given the http method, path, request bytes, and http options. CompletableFuture<ApiResponse>asyncRequest(String httpMethod, String path, String requestJson, Optional<HttpOptions> httpOptions)Sends an asynchronous Http request given the http method, path, request json string, and http options. CompletableFuture<ApiResponse>asyncRequest(String httpMethod, String path, Array<byte> requestBytes, Optional<HttpOptions> httpOptions)Sends an asynchronous Http request given the http method, path, request bytes, and http options. -
Methods inherited from class com.google.genai.ApiClient
apiKey, close, credentials, customBaseUrl, defaultEnvironmentVariables, httpClient, httpOptions, location, project, setDefaultBaseUrls, vertexAI -
Methods inherited from class java.lang.AutoCloseable
close -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ReplayApiClient
ReplayApiClient(Optional<String> apiKey, Optional<HttpOptions> httpOptions, Optional<ClientOptions> clientOptions, String replaysDirectory, String replayId, String clientMode)
Constructs an ApiClient for Google AI APIs.
-
ReplayApiClient
ReplayApiClient(Optional<String> apiKey, Optional<String> project, Optional<String> location, Optional<GoogleCredentials> credentials, Optional<HttpOptions> httpOptions, Optional<ClientOptions> clientOptions, String replaysDirectory, String replayId, String clientMode)
Constructs an ApiClient for Vertex AI APIs.
-
-
Method Detail
-
initializeReplaySession
void initializeReplaySession(String replayId)
Initializes the replay session.
-
request
ApiResponse request(String httpMethod, String path, String requestJson, Optional<HttpOptions> httpOptions)
Sends a Http Post request given the path and request json string.
-
request
ApiResponse request(String httpMethod, String path, Array<byte> requestBytes, Optional<HttpOptions> httpOptions)
Sends a Http request given the http method, path, request bytes, and http options.
-
asyncRequest
CompletableFuture<ApiResponse> asyncRequest(String httpMethod, String path, String requestJson, Optional<HttpOptions> httpOptions)
Sends an asynchronous Http request given the http method, path, request json string, and http options.
-
asyncRequest
CompletableFuture<ApiResponse> asyncRequest(String httpMethod, String path, Array<byte> requestBytes, Optional<HttpOptions> httpOptions)
Sends an asynchronous Http request given the http method, path, request bytes, and http options.
-
-
-
-