Package com.google.genai
Class ReplayApiClient
java.lang.Object
com.google.genai.ApiClient
com.google.genai.ReplayApiClient
Base client for the HTTP APIs.
-
Constructor Summary
ConstructorsConstructorDescriptionReplayApiClient(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<com.google.auth.oauth2.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 TypeMethodDescriptionasyncRequest(String httpMethod, String path, byte[] requestBytes, Optional<HttpOptions> httpOptions) Sends an asynchronous Http request given the http method, path, request bytes, and http options.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.voidinitializeReplaySession(String replayId) Initializes the replay session.request(String httpMethod, String path, byte[] requestBytes, Optional<HttpOptions> httpOptions) Sends a Http request given the http method, path, request bytes, and http options.Sends a Http Post request given the path and request json string.Methods inherited from class com.google.genai.ApiClient
apiKey, defaultEnvironmentVariables, httpClient, httpOptions, location, project, setDefaultBaseUrls, vertexAI
-
Constructor Details
-
ReplayApiClient
public ReplayApiClient(Optional<String> apiKey, Optional<HttpOptions> httpOptions, Optional<ClientOptions> clientOptions, String replaysDirectory, String replayId, String clientMode) Constructs an ApiClient for Google AI APIs. -
ReplayApiClient
public ReplayApiClient(Optional<String> apiKey, Optional<String> project, Optional<String> location, Optional<com.google.auth.oauth2.GoogleCredentials> credentials, Optional<HttpOptions> httpOptions, Optional<ClientOptions> clientOptions, String replaysDirectory, String replayId, String clientMode) Constructs an ApiClient for Vertex AI APIs.
-
-
Method Details
-
initializeReplaySession
Initializes the replay session. -
request
public ApiResponse request(String httpMethod, String path, String requestJson, Optional<HttpOptions> httpOptions) Sends a Http Post request given the path and request json string. -
request
public ApiResponse request(String httpMethod, String path, byte[] requestBytes, Optional<HttpOptions> httpOptions) Sends a Http request given the http method, path, request bytes, and http options. -
asyncRequest
public 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.- Specified by:
asyncRequestin classApiClient
-
asyncRequest
public CompletableFuture<ApiResponse> asyncRequest(String httpMethod, String path, byte[] requestBytes, Optional<HttpOptions> httpOptions) Sends an asynchronous Http request given the http method, path, request bytes, and http options.- Specified by:
asyncRequestin classApiClient
-