Package com.google.genai.types
Class AuthConfigOauthConfig
-
- All Implemented Interfaces:
public abstract class AuthConfigOauthConfig extends JsonSerializable
Config for user oauth. This data type is not supported in Gemini API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classAuthConfigOauthConfig.BuilderBuilder for AuthConfigOauthConfig.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description AuthConfigOauthConfig()
-
Method Summary
Modifier and Type Method Description abstract Optional<String>accessToken()Access token for extension endpoint. abstract Optional<String>serviceAccount()The service account used to generate access tokens for executing the Extension. static AuthConfigOauthConfig.Builderbuilder()Instantiates a builder for AuthConfigOauthConfig. abstract AuthConfigOauthConfig.BuildertoBuilder()Creates a builder with the same values as this instance. static AuthConfigOauthConfigfromJson(String jsonString)Deserializes a JSON string to a AuthConfigOauthConfig object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
accessToken
abstract Optional<String> accessToken()
Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
-
serviceAccount
abstract Optional<String> serviceAccount()
The service account used to generate access tokens for executing the Extension. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account.
-
builder
static AuthConfigOauthConfig.Builder builder()
Instantiates a builder for AuthConfigOauthConfig.
-
toBuilder
abstract AuthConfigOauthConfig.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static AuthConfigOauthConfig fromJson(String jsonString)
Deserializes a JSON string to a AuthConfigOauthConfig object.
-
-
-
-