Package com.google.genai.types
Class HttpOptions
-
- All Implemented Interfaces:
public abstract class HttpOptions extends JsonSerializable
HTTP options to be used in each of the requests.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classHttpOptions.BuilderBuilder for HttpOptions.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description HttpOptions()
-
Method Summary
Modifier and Type Method Description abstract Optional<String>baseUrl()The base URL for the AI platform service endpoint. abstract Optional<ResourceScope>baseUrlResourceScope()The resource scope used to constructing the resource name when base_url is set abstract Optional<String>apiVersion()Specifies the version of the API to use. abstract Optional<Map<String, String>>headers()Additional HTTP headers to be sent with the request. abstract Optional<Integer>timeout()Timeout for the request in milliseconds. abstract Optional<Map<String, Object>>extraBody()Extra parameters to add to the request body. abstract Optional<HttpRetryOptions>retryOptions()HTTP retry options for the request. static HttpOptions.Builderbuilder()Instantiates a builder for HttpOptions. abstract HttpOptions.BuildertoBuilder()Creates a builder with the same values as this instance. static HttpOptionsfromJson(String jsonString)Deserializes a JSON string to a HttpOptions object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
baseUrlResourceScope
abstract Optional<ResourceScope> baseUrlResourceScope()
The resource scope used to constructing the resource name when base_url is set
-
apiVersion
abstract Optional<String> apiVersion()
Specifies the version of the API to use.
-
headers
abstract Optional<Map<String, String>> headers()
Additional HTTP headers to be sent with the request.
-
extraBody
abstract Optional<Map<String, Object>> extraBody()
Extra parameters to add to the request body. The structure must match the backend API's request structure. - Gemini Enterprise Agent Platform backend API docs: https://cloud.google.com/vertex-ai/docs/reference/rest - GeminiAPI backend API docs: https://ai.google.dev/api/rest
-
retryOptions
abstract Optional<HttpRetryOptions> retryOptions()
HTTP retry options for the request.
-
builder
static HttpOptions.Builder builder()
Instantiates a builder for HttpOptions.
-
toBuilder
abstract HttpOptions.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static HttpOptions fromJson(String jsonString)
Deserializes a JSON string to a HttpOptions object.
-
-
-
-