Package com.google.genai.types
Class HttpOptions
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.HttpOptions
HTTP options to be used in each of the requests.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSpecifies the version of the API to use.baseUrl()
The base URL for the AI platform service endpoint.static HttpOptions.Builder
builder()
Instantiates a builder for HttpOptions.Extra parameters to add to the request body.static HttpOptions
Deserializes a JSON string to a HttpOptions object.headers()
Additional HTTP headers to be sent with the request.timeout()
Timeout for the request in milliseconds.abstract HttpOptions.Builder
Creates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
stringToJsonNode, toJson
-
Constructor Details
-
HttpOptions
public HttpOptions()
-
-
Method Details
-
baseUrl
The base URL for the AI platform service endpoint. -
apiVersion
Specifies the version of the API to use. -
headers
Additional HTTP headers to be sent with the request. -
timeout
Timeout for the request in milliseconds. -
extraBody
Extra parameters to add to the request body. The structure must match the backend API's request structure. - VertexAI backend API docs: https://cloud.google.com/vertex-ai/docs/reference/rest - GeminiAPI backend API docs: https://ai.google.dev/api/rest -
builder
Instantiates a builder for HttpOptions. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a HttpOptions object.
-