Class ApiKeyConfig

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

public abstract class ApiKeyConfig extends JsonSerializable
Config for authentication with API key.
  • Constructor Details

    • ApiKeyConfig

      public ApiKeyConfig()
  • Method Details

    • apiKeyString

      public abstract Optional<String> apiKeyString()
      The API key to be used in the request directly.
    • builder

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

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

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