FirebaseModelOptions.Builder

public static class FirebaseModelOptions.Builder extends Object

Builder class of FirebaseModelOptions.

Public Constructor Summary

FirebaseModelOptions.Builder()
Creates a new builder to build FirebaseModelOptions.

Public Method Summary

FirebaseModelOptions
build()
Builds a FirebaseModelOptions.
FirebaseModelOptions.Builder
setLocalModelName(String localModelName)
Sets a local model name to FirebaseModelOptions.
FirebaseModelOptions.Builder
setRemoteModelName(String remoteModelName)
Sets a cloud model name to FirebaseModelOptions.

Inherited Method Summary

Public Constructors

public FirebaseModelOptions.Builder ()

Creates a new builder to build FirebaseModelOptions.

Public Methods

public FirebaseModelOptions build ()

Builds a FirebaseModelOptions.

public FirebaseModelOptions.Builder setLocalModelName (String localModelName)

Sets a local model name to FirebaseModelOptions. Note local model has a lower priority than the cloud model, if specified. It will only be used if there is no FirebaseRemoteModel or the download of FirebaseRemoteModel fails.

public FirebaseModelOptions.Builder setRemoteModelName (String remoteModelName)

Sets a cloud model name to FirebaseModelOptions. Once set, it has higher priority than the local model. If you would like to use local model, do not assign cloud model source.

It would trigger a model downloading if there is no previous downloaded model under the given model name, or the model in cloud is different from the latest downloaded model on device.