Class CreateAuthTokenConfig.Builder

java.lang.Object
com.google.genai.types.CreateAuthTokenConfig.Builder
Enclosing class:
CreateAuthTokenConfig

public abstract static class CreateAuthTokenConfig.Builder extends Object
Builder for CreateAuthTokenConfig.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • httpOptions

      public abstract CreateAuthTokenConfig.Builder httpOptions(HttpOptions httpOptions)
      Setter for httpOptions.

      httpOptions: Used to override HTTP request options.

    • httpOptions

      public CreateAuthTokenConfig.Builder httpOptions(HttpOptions.Builder httpOptionsBuilder)
      Setter for httpOptions builder.

      httpOptions: Used to override HTTP request options.

    • expireTime

      public abstract CreateAuthTokenConfig.Builder expireTime(Instant expireTime)
      Setter for expireTime.

      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

      public abstract CreateAuthTokenConfig.Builder newSessionExpireTime(Instant newSessionExpireTime)
      Setter for newSessionExpireTime.

      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

      public abstract CreateAuthTokenConfig.Builder uses(Integer uses)
      Setter for uses.

      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

      public abstract CreateAuthTokenConfig.Builder liveConnectConstraints(LiveConnectConstraints liveConnectConstraints)
      Setter for liveConnectConstraints.

      liveConnectConstraints: Configuration specific to Live API connections created using this token.

    • liveConnectConstraints

      public CreateAuthTokenConfig.Builder liveConnectConstraints(LiveConnectConstraints.Builder liveConnectConstraintsBuilder)
      Setter for liveConnectConstraints builder.

      liveConnectConstraints: Configuration specific to Live API connections created using this token.

    • lockAdditionalFields

      public abstract CreateAuthTokenConfig.Builder lockAdditionalFields(List<String> lockAdditionalFields)
      Setter for lockAdditionalFields.

      lockAdditionalFields: Additional fields to lock in the effective LiveConnectParameters.

    • lockAdditionalFields

      public CreateAuthTokenConfig.Builder lockAdditionalFields(String... lockAdditionalFields)
      Setter for lockAdditionalFields.

      lockAdditionalFields: Additional fields to lock in the effective LiveConnectParameters.

    • build

      public abstract CreateAuthTokenConfig build()