Class AuthConfig.Builder
- java.lang.Object
-
- com.codedstream.otterstream.inference.config.AuthConfig.Builder
-
- Enclosing class:
- AuthConfig
public static class AuthConfig.Builder extends Object
Builder for creating AuthConfig instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthConfig.BuilderapiKey(String apiKey)Sets the API key.AuthConfigbuild()Builds the AuthConfig instance.AuthConfig.Builderheaders(Map<String,String> headers)Sets custom authentication headers.AuthConfig.Buildertoken(String token)Sets the bearer token.
-
-
-
Method Detail
-
apiKey
public AuthConfig.Builder apiKey(String apiKey)
Sets the API key.- Parameters:
apiKey- the API key- Returns:
- this builder
-
token
public AuthConfig.Builder token(String token)
Sets the bearer token.- Parameters:
token- the bearer token- Returns:
- this builder
-
headers
public AuthConfig.Builder headers(Map<String,String> headers)
Sets custom authentication headers.- Parameters:
headers- map of header name-value pairs- Returns:
- this builder
-
build
public AuthConfig build()
Builds the AuthConfig instance.- Returns:
- configured AuthConfig
-
-