Class CreateAuthTokenConfig
-
- All Implemented Interfaces:
public abstract class CreateAuthTokenConfig extends JsonSerializable
Optional parameters.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classCreateAuthTokenConfig.BuilderBuilder for CreateAuthTokenConfig.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description CreateAuthTokenConfig()
-
Method Summary
Modifier and Type Method Description abstract Optional<HttpOptions>httpOptions()Used to override HTTP request options. abstract Optional<Instant>expireTime()An optional time after which, when using the resulting token, messages in Live API sessions will be rejected. abstract Optional<Instant>newSessionExpireTime()The time after which new Live API sessions using the token resulting from this request will be rejected. abstract Optional<Integer>uses()The number of times the token can be used. abstract Optional<LiveConnectConstraints>liveConnectConstraints()Configuration specific to Live API connections created using this token. abstract Optional<List<String>>lockAdditionalFields()Additional fields to lock in the effective LiveConnectParameters. static CreateAuthTokenConfig.Builderbuilder()Instantiates a builder for CreateAuthTokenConfig. abstract CreateAuthTokenConfig.BuildertoBuilder()Creates a builder with the same values as this instance. static CreateAuthTokenConfigfromJson(String jsonString)Deserializes a JSON string to a CreateAuthTokenConfig 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
-
httpOptions
abstract Optional<HttpOptions> httpOptions()
Used to override HTTP request options.
-
expireTime
abstract Optional<Instant> expireTime()
An optional time after which, when using the resulting token, messages in Live API 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
abstract Optional<Instant> newSessionExpireTime()
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
abstract Optional<Integer> uses()
The number of times the token can be used. If this value is zero then no limit is applied. Default is 1. Resuming a Live API session does not count as a use.
-
liveConnectConstraints
abstract Optional<LiveConnectConstraints> liveConnectConstraints()
Configuration specific to Live API connections created using this token.
-
lockAdditionalFields
abstract Optional<List<String>> lockAdditionalFields()
Additional fields to lock in the effective LiveConnectParameters.
-
builder
static CreateAuthTokenConfig.Builder builder()
Instantiates a builder for CreateAuthTokenConfig.
-
toBuilder
abstract CreateAuthTokenConfig.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static CreateAuthTokenConfig fromJson(String jsonString)
Deserializes a JSON string to a CreateAuthTokenConfig object.
-
-
-
-