Replay Api Client
Base client for the HTTP APIs.
Constructors
Link copied to clipboard
public void ReplayApiClient(Optional<String> apiKey, Optional<HttpOptions> httpOptions, Optional<ClientOptions> clientOptions, String replaysDirectory, String replayId, String clientMode)
Constructs an ApiClient for Google AI APIs.
public void 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.
Functions
Link copied to clipboard
public 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.
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.
Link copied to clipboard
Returns the GoogleCredentials for Vertex AI APIs.
Link copied to clipboard
Returns the custom base URL if provided.
Link copied to clipboard
Returns the default environment variables for the client.
Link copied to clipboard
Returns the HttpClient for API calls.
Link copied to clipboard
Returns the HTTP options for API calls.
Link copied to clipboard
Initializes the replay session.
Link copied to clipboard
public 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.
public ApiResponse request(String httpMethod, String path, String requestJson, Optional<HttpOptions> httpOptions)
Sends a Http Post request given the path and request json string.
Link copied to clipboard
public static void setDefaultBaseUrls(Optional<String> geminiBaseUrl, Optional<String> vertexBaseUrl)
Overrides the base URLs for the Gemini API and/or Vertex AI API.