Package com.google.genai.types
Class HttpOptions.Builder
java.lang.Object
com.google.genai.types.HttpOptions.Builder
- Enclosing class:
- HttpOptions
Builder for HttpOptions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract HttpOptions.BuilderapiVersion(String apiVersion) Setter for apiVersion.abstract HttpOptions.BuilderSetter for baseUrl.abstract HttpOptionsbuild()Clears the value of apiVersion field.Clears the value of baseUrl field.Clears the value of extraBody field.Clears the value of headers field.Clears the value of retryOptions field.Clears the value of timeout field.abstract HttpOptions.BuilderSetter for extraBody.abstract HttpOptions.BuilderSetter for headers.abstract HttpOptions.BuilderretryOptions(HttpRetryOptions retryOptions) Setter for retryOptions.retryOptions(HttpRetryOptions.Builder retryOptionsBuilder) Setter for retryOptions builder.abstract HttpOptions.BuilderSetter for timeout.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
baseUrl
Setter for baseUrl.baseUrl: The base URL for the AI platform service endpoint.
-
clearBaseUrl
Clears the value of baseUrl field. -
apiVersion
Setter for apiVersion.apiVersion: Specifies the version of the API to use.
-
clearApiVersion
Clears the value of apiVersion field. -
headers
Setter for headers.headers: Additional HTTP headers to be sent with the request.
-
clearHeaders
Clears the value of headers field. -
timeout
Setter for timeout.timeout: Timeout for the request in milliseconds.
-
clearTimeout
Clears the value of timeout field. -
extraBody
Setter for extraBody.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
-
clearExtraBody
Clears the value of extraBody field. -
retryOptions
Setter for retryOptions.retryOptions: HTTP retry options for the request.
-
retryOptions
@CanIgnoreReturnValue public HttpOptions.Builder retryOptions(HttpRetryOptions.Builder retryOptionsBuilder) Setter for retryOptions builder.retryOptions: HTTP retry options for the request.
-
clearRetryOptions
Clears the value of retryOptions field. -
build
-