Builder

class Builder(appId: String)

Builder used to construct instances of an AppConfiguration in a fluent manner.

Parameters

appId

the application id of the App Services Application.

Constructors

Builder
Link copied to clipboard
fun Builder(appId: String)

Functions

appName
Link copied to clipboard
fun appName(appName: String): AppConfiguration.Builder

Sets the debug app name which is added to debug headers for App Services network requests. The default is null.

appVersion
Link copied to clipboard
fun appVersion(appVersion: String): AppConfiguration.Builder

Sets the debug app version which is added to debug headers for App Services network requests. The default is null

baseUrl
Link copied to clipboard
fun baseUrl(baseUrl: String): AppConfiguration.Builder

Sets the base url for the App Services Application. The default value is DEFAULT_BASE_URL.

build
Link copied to clipboard
fun build(): AppConfiguration

Creates the AppConfiguration from the properties of the builder.

fun build(bundleId: String): AppConfiguration
dispatcher
Link copied to clipboard
fun dispatcher(dispatcher: <ERROR CLASS>): AppConfiguration.Builder

The dispatcher used to execute internal tasks; most notably remote HTTP requests.

ejson
Link copied to clipboard
fun ejson(ejson: <ERROR CLASS>): AppConfiguration.Builder

Sets the default EJson decoder that would be use to encode and decode arguments and results when calling remote Atlas Functions, authenticating with a customFunction, and retrieving a user profile or customData.

encryptionKey
Link copied to clipboard
fun encryptionKey(key: ByteArray): AppConfiguration.Builder

Sets the encryption key used to encrypt the user metadata Realm only. Individual Realms need to use SyncConfiguration.Builder.encryptionKey to encrypt them.

httpLogObfuscator
Link copied to clipboard
fun httpLogObfuscator(httpLogObfuscator: HttpLogObfuscator?): AppConfiguration.Builder

Sets the a HttpLogObfuscator used to keep sensitive information in HTTP requests from being displayed in the log. Logs containing tokens, passwords or custom function arguments and the result of computing these will be obfuscated by default. Logs will not be obfuscated if the value is set to null.

log
Link copied to clipboard
fun log(level: <ERROR CLASS> = LogLevel.WARN, customLoggers: List<<ERROR CLASS>> = emptyList()): AppConfiguration.Builder

Configures how Realm will report log events for this App.

syncRootDirectory
Link copied to clipboard
fun syncRootDirectory(rootDir: String): AppConfiguration.Builder

Configures the root folder that marks the location of a mongodb-realm folder. This folder contains all files and realms used when synchronizing data between the device and Atlas using Device Sync.