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

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

      httpOptions: Used to override HTTP request options.

    • clearHttpOptions

      @CanIgnoreReturnValue public CreateAuthTokenConfig.Builder clearHttpOptions()
      Clears the value of httpOptions field.
    • 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.

    • clearExpireTime

      @CanIgnoreReturnValue public CreateAuthTokenConfig.Builder clearExpireTime()
      Clears the value of expireTime field.
    • 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.

    • clearNewSessionExpireTime

      @CanIgnoreReturnValue public CreateAuthTokenConfig.Builder clearNewSessionExpireTime()
      Clears the value of newSessionExpireTime field.
    • 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.

    • clearUses

      @CanIgnoreReturnValue public CreateAuthTokenConfig.Builder clearUses()
      Clears the value of uses field.
    • liveConnectConstraints

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

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

    • liveConnectConstraints

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

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

    • clearLiveConnectConstraints

      @CanIgnoreReturnValue public CreateAuthTokenConfig.Builder clearLiveConnectConstraints()
      Clears the value of liveConnectConstraints field.
    • lockAdditionalFields

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

      lockAdditionalFields: Additional fields to lock in the effective LiveConnectParameters.

    • lockAdditionalFields

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

      lockAdditionalFields: Additional fields to lock in the effective LiveConnectParameters.

    • clearLockAdditionalFields

      @CanIgnoreReturnValue public CreateAuthTokenConfig.Builder clearLockAdditionalFields()
      Clears the value of lockAdditionalFields field.
    • build

      public abstract CreateAuthTokenConfig build()