Class AuthConfig.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • apiKeyConfig

      public abstract AuthConfig.Builder apiKeyConfig(ApiKeyConfig apiKeyConfig)
      Setter for apiKeyConfig.

      apiKeyConfig: Config for API key auth.

    • apiKeyConfig

      @CanIgnoreReturnValue public AuthConfig.Builder apiKeyConfig(ApiKeyConfig.Builder apiKeyConfigBuilder)
      Setter for apiKeyConfig builder.

      apiKeyConfig: Config for API key auth.

    • clearApiKeyConfig

      @CanIgnoreReturnValue public AuthConfig.Builder clearApiKeyConfig()
      Clears the value of apiKeyConfig field.
    • authType

      public abstract AuthConfig.Builder authType(AuthType authType)
      Setter for authType.

      authType: Type of auth scheme.

    • clearAuthType

      @CanIgnoreReturnValue public AuthConfig.Builder clearAuthType()
      Clears the value of authType field.
    • authType

      @CanIgnoreReturnValue public AuthConfig.Builder authType(AuthType.Known knownType)
      Setter for authType given a known enum.

      authType: Type of auth scheme.

    • authType

      @CanIgnoreReturnValue public AuthConfig.Builder authType(String authType)
      Setter for authType given a string.

      authType: Type of auth scheme.

    • googleServiceAccountConfig

      public abstract AuthConfig.Builder googleServiceAccountConfig(AuthConfigGoogleServiceAccountConfig googleServiceAccountConfig)
      Setter for googleServiceAccountConfig.

      googleServiceAccountConfig: Config for Google Service Account auth.

    • googleServiceAccountConfig

      @CanIgnoreReturnValue public AuthConfig.Builder googleServiceAccountConfig(AuthConfigGoogleServiceAccountConfig.Builder googleServiceAccountConfigBuilder)
      Setter for googleServiceAccountConfig builder.

      googleServiceAccountConfig: Config for Google Service Account auth.

    • clearGoogleServiceAccountConfig

      @CanIgnoreReturnValue public AuthConfig.Builder clearGoogleServiceAccountConfig()
      Clears the value of googleServiceAccountConfig field.
    • httpBasicAuthConfig

      public abstract AuthConfig.Builder httpBasicAuthConfig(AuthConfigHttpBasicAuthConfig httpBasicAuthConfig)
      Setter for httpBasicAuthConfig.

      httpBasicAuthConfig: Config for HTTP Basic auth.

    • httpBasicAuthConfig

      @CanIgnoreReturnValue public AuthConfig.Builder httpBasicAuthConfig(AuthConfigHttpBasicAuthConfig.Builder httpBasicAuthConfigBuilder)
      Setter for httpBasicAuthConfig builder.

      httpBasicAuthConfig: Config for HTTP Basic auth.

    • clearHttpBasicAuthConfig

      @CanIgnoreReturnValue public AuthConfig.Builder clearHttpBasicAuthConfig()
      Clears the value of httpBasicAuthConfig field.
    • oauthConfig

      public abstract AuthConfig.Builder oauthConfig(AuthConfigOauthConfig oauthConfig)
      Setter for oauthConfig.

      oauthConfig: Config for user oauth.

    • oauthConfig

      @CanIgnoreReturnValue public AuthConfig.Builder oauthConfig(AuthConfigOauthConfig.Builder oauthConfigBuilder)
      Setter for oauthConfig builder.

      oauthConfig: Config for user oauth.

    • clearOauthConfig

      @CanIgnoreReturnValue public AuthConfig.Builder clearOauthConfig()
      Clears the value of oauthConfig field.
    • oidcConfig

      public abstract AuthConfig.Builder oidcConfig(AuthConfigOidcConfig oidcConfig)
      Setter for oidcConfig.

      oidcConfig: Config for user OIDC auth.

    • oidcConfig

      @CanIgnoreReturnValue public AuthConfig.Builder oidcConfig(AuthConfigOidcConfig.Builder oidcConfigBuilder)
      Setter for oidcConfig builder.

      oidcConfig: Config for user OIDC auth.

    • clearOidcConfig

      @CanIgnoreReturnValue public AuthConfig.Builder clearOidcConfig()
      Clears the value of oidcConfig field.
    • build

      public abstract AuthConfig build()