Package com.google.genai.types
Class AuthToken
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.AuthToken
Config for auth_tokens.create parameters.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AuthToken.Builderbuilder()Instantiates a builder for AuthToken.Optional.static AuthTokenDeserializes a JSON string to a AuthToken object.name()The name of the auth token.Optional.abstract AuthToken.BuilderCreates a builder with the same values as this instance.uses()Optional.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
AuthToken
public AuthToken()
-
-
Method Details
-
name
The name of the auth token. -
expireTime
Optional. Input only. Immutable. An optional time after which, when using the resulting token, messages in BidiGenerateContent sessions will be rejected. (Gemini may preemptively close the session after this time.) If not set then this defaults to 30 minutes in the future. If set, this value must be less than 20 hours in the future. -
newSessionExpireTime
Optional. Input only. Immutable. The time after which new Live API sessions using the token resulting from this request will be rejected. If not set this defaults to 60 seconds in the future. If set, this value must be less than 20 hours in the future. -
uses
Optional. Input only. Immutable. The number of times the token can be used. If this value is zero then no limit is applied. Resuming a Live API session does not count as a use. If unspecified, the default is 1. -
builder
Instantiates a builder for AuthToken. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a AuthToken object.
-