Class HttpOptions

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.HttpOptions

public abstract class HttpOptions extends JsonSerializable
HTTP options to be used in each of the requests.
  • Constructor Details

    • HttpOptions

      public HttpOptions()
  • Method Details

    • baseUrl

      public abstract Optional<String> baseUrl()
      The base URL for the AI platform service endpoint.
    • apiVersion

      public abstract Optional<String> apiVersion()
      Specifies the version of the API to use.
    • headers

      public abstract Optional<Map<String,String>> headers()
      Additional HTTP headers to be sent with the request.
    • timeout

      public abstract Optional<Integer> timeout()
      Timeout for the request in milliseconds.
    • builder

      public static HttpOptions.Builder builder()
      Instantiates a builder for HttpOptions.
    • toBuilder

      public abstract HttpOptions.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static HttpOptions fromJson(String jsonString)
      Deserializes a JSON string to a HttpOptions object.