Package com.google.genai
Class Client.Builder
java.lang.Object
com.google.genai.Client.Builder
- Enclosing class:
- Client
Builder for
Client.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the API key for Gemini API.build()Builds theClientinstance.clientOptions(ClientOptions clientOptions) Sets theClientOptionsfor the API client.credentials(com.google.auth.oauth2.GoogleCredentials credentials) Sets theGoogleCredentialsfor Vertex AI APIs.httpOptions(HttpOptions httpOptions) Sets theHttpOptionsfor the API client.Sets the location for Vertex AI APIs.Sets the project ID for Vertex AI APIs.vertexAI(boolean vertexAI) Sets whether to use Vertex AI APIs.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Builds theClientinstance. -
apiKey
Sets the API key for Gemini API. -
project
Sets the project ID for Vertex AI APIs. -
location
Sets the location for Vertex AI APIs. -
credentials
@CanIgnoreReturnValue public Client.Builder credentials(com.google.auth.oauth2.GoogleCredentials credentials) Sets theGoogleCredentialsfor Vertex AI APIs. -
clientOptions
Sets theClientOptionsfor the API client. -
httpOptions
Sets theHttpOptionsfor the API client. -
vertexAI
Sets whether to use Vertex AI APIs.
-