# LocalModel.Builder

public static class **LocalModel.Builder** extends [Object](https://developer.android.com/reference/java/lang/Object.html)  
Builder class of `https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel`.

Only call one of `https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder#setAbsoluteFilePath(java.lang.String)`, `https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder#setAbsoluteManifestFilePath(java.lang.String)`, `https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder#setAssetFilePath(java.lang.String)`, `https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder#setAssetManifestFilePath(java.lang.String)` and `https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder#setUri(android.net.Uri)`.

### Public Constructor Summary

|---|---|
|   | [Builder](https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder#Builder())() |

### Public Method Summary

|---|---|
| [LocalModel](https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel) | [build](https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder#build())() Builds an instance of `https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel` with provided info. |
| [LocalModel.Builder](https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder) | [setAbsoluteFilePath](https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder#setAbsoluteFilePath(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) absoluteFilePath) Sets the absolute file path of the local model file. |
| [LocalModel.Builder](https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder) | [setAbsoluteManifestFilePath](https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder#setAbsoluteManifestFilePath(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) absoluteManifestFilePath) Sets the absolute file path of the local model's manifest file. |
| [LocalModel.Builder](https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder) | [setAssetFilePath](https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder#setAssetFilePath(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) assetFilePath) Sets the asset subpath of the asset model file. |
| [LocalModel.Builder](https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder) | [setAssetManifestFilePath](https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder#setAssetManifestFilePath(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) assetManifestFilePath) Sets the asset subpath of the asset model's manifest file. |
| [LocalModel.Builder](https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder) | [setUri](https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder#setUri(android.net.Uri))([Uri](https://developer.android.com/reference/android/net/Uri.html) uri) Sets the URI of the model file. |

### Inherited Method Summary

From class java.lang.Object

|---|---|
| [Object](https://developer.android.com/reference/java/lang/Object.html) | clone() |
| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |
| void | finalize() |
| final [Class](https://developer.android.com/reference/java/lang/Class.html)\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

## Public Constructors

#### public **Builder** ()

## Public Methods

#### public [LocalModel](https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel)
**build** ()

Builds an instance of `https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel`
with provided info.

#### public [LocalModel.Builder](https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder)
**setAbsoluteFilePath** ([String](https://developer.android.com/reference/java/lang/String.html) absoluteFilePath)

Sets the absolute file path of the local model file.

#### public [LocalModel.Builder](https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder)
**setAbsoluteManifestFilePath** ([String](https://developer.android.com/reference/java/lang/String.html) absoluteManifestFilePath)

Sets the absolute file path of the local model's manifest file.

#### public [LocalModel.Builder](https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder)
**setAssetFilePath** ([String](https://developer.android.com/reference/java/lang/String.html) assetFilePath)

Sets the asset subpath of the asset model file.

Make sure your model asset file is not compressed by using aaptOptions. For more
details, refer to [documentation](https://developers.google.com/ml-kit/vision/auto-ml-vision-edge/android#configure-a-local-model-source).

#### public [LocalModel.Builder](https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder)
**setAssetManifestFilePath** ([String](https://developer.android.com/reference/java/lang/String.html) assetManifestFilePath)

Sets the asset subpath of the asset model's manifest file.

Make sure your asset file is not compressed by using aaptOptions. For more details,
refer to [documentation](https://developers.google.com/ml-kit/vision/auto-ml-vision-edge/android#configure-a-local-model-source).

#### public [LocalModel.Builder](https://developers.google.com/android/reference/com/google/mlkit/common/model/LocalModel.Builder)
**setUri** ([Uri](https://developer.android.com/reference/android/net/Uri.html) uri)

Sets the URI of the model file.

URI schemes can be content, android.resource or file. `https://developers.google.com/android/reference/com/google/mlkit/common/MlKitException`
with error code `https://developers.google.com/android/reference/com/google/mlkit/common/MlKitException#NOT_FOUND`
will be thrown when loading model if URI scheme is not one of 3 supported schemes.