Package io.moov.sdk
Class Moov.Builder
- java.lang.Object
-
- io.moov.sdk.Moov.Builder
-
- Enclosing class:
- Moov
public static class Moov.Builder extends java.lang.ObjectThe Builder class allows the configuration of a new instance of the SDK.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Moovbuild()Builds a new instance of the SDK.Moov.Builderclient(HTTPClient client)Allows the default HTTP client to be overridden with a custom implementation.Moov.BuilderenableHTTPDebugLogging(boolean enabled)Enables debug logging for HTTP requests and responses, including JSON body content.Moov.BuilderretryConfig(RetryConfig retryConfig)Overrides the default configuration for retriesMoov.Buildersecurity(Security security)Configures the SDK to use the provided security details.Moov.BuildersecuritySource(SecuritySource securitySource)Configures the SDK to use a custom security source.Moov.BuilderserverIndex(int serverIdx)Overrides the default server by index.Moov.BuilderserverURL(java.lang.String serverUrl)Overrides the default server URL.Moov.BuilderserverURL(java.lang.String serverUrl, java.util.Map<java.lang.String,java.lang.String> params)Overrides the default server URL with a templated URL populated with the provided parameters.Moov.BuilderxMoovVersion(java.lang.String xMoovVersion)Allows setting the xMoovVersion parameter for all supported operations.
-
-
-
Method Detail
-
client
public Moov.Builder client(HTTPClient client)
Allows the default HTTP client to be overridden with a custom implementation.- Parameters:
client- The HTTP client to use for all requests.- Returns:
- The builder instance.
-
security
public Moov.Builder security(Security security)
Configures the SDK to use the provided security details.- Parameters:
security- The security details to use for all requests. Can benull.- Returns:
- The builder instance.
-
securitySource
public Moov.Builder securitySource(SecuritySource securitySource)
Configures the SDK to use a custom security source.- Parameters:
securitySource- The security source to use for all requests.- Returns:
- The builder instance.
-
serverURL
public Moov.Builder serverURL(java.lang.String serverUrl)
Overrides the default server URL.- Parameters:
serverUrl- The server URL to use for all requests.- Returns:
- The builder instance.
-
serverURL
public Moov.Builder serverURL(java.lang.String serverUrl, java.util.Map<java.lang.String,java.lang.String> params)
Overrides the default server URL with a templated URL populated with the provided parameters.- Parameters:
serverUrl- The server URL to use for all requests.params- The parameters to use when templating the URL.- Returns:
- The builder instance.
-
serverIndex
public Moov.Builder serverIndex(int serverIdx)
Overrides the default server by index.- Parameters:
serverIdx- The server to use for all requests.- Returns:
- The builder instance.
-
retryConfig
public Moov.Builder retryConfig(RetryConfig retryConfig)
Overrides the default configuration for retries- Parameters:
retryConfig- The retry configuration to use for all requests.- Returns:
- The builder instance.
-
enableHTTPDebugLogging
public Moov.Builder enableHTTPDebugLogging(boolean enabled)
Enables debug logging for HTTP requests and responses, including JSON body content.Convenience method that calls
HTTPClient.enableDebugLogging(boolean).SpeakeasyHTTPClienthonors this setting. If you are using a custom HTTP client, it is up to the custom client to honor this setting.- Parameters:
enabled- Whether to enable debug logging.- Returns:
- The builder instance.
-
xMoovVersion
public Moov.Builder xMoovVersion(java.lang.String xMoovVersion)
Allows setting the xMoovVersion parameter for all supported operations.- Parameters:
xMoovVersion- The value to set.- Returns:
- The builder instance.
-
build
public Moov build()
Builds a new instance of the SDK.- Returns:
- The SDK instance.
-
-