Class HttpOptions.Builder

java.lang.Object
com.google.genai.types.HttpOptions.Builder
Enclosing class:
HttpOptions

public abstract static class HttpOptions.Builder extends Object
Builder for HttpOptions.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • baseUrl

      public abstract HttpOptions.Builder baseUrl(String baseUrl)
      Setter for baseUrl.

      baseUrl: The base URL for the AI platform service endpoint.

    • apiVersion

      public abstract HttpOptions.Builder apiVersion(String apiVersion)
      Setter for apiVersion.

      apiVersion: Specifies the version of the API to use.

    • headers

      public abstract HttpOptions.Builder headers(Map<String,String> headers)
      Setter for headers.

      headers: Additional HTTP headers to be sent with the request.

    • timeout

      public abstract HttpOptions.Builder timeout(Integer timeout)
      Setter for timeout.

      timeout: Timeout for the request in milliseconds.

    • extraBody

      public abstract HttpOptions.Builder extraBody(Map<String,Object> 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

    • build

      public abstract HttpOptions build()