CustomModel

class CustomModel


Stores information about custom models that are being downloaded or are already downloaded on a device. In the case where an update is available, after the updated model file is fully downloaded, the original model file will be removed once it is safe to do so.

Summary

Public functions

Boolean
equals(o: Any!)
File?

The local model file.

Long

The size of the file currently associated with this model.

Int
String

Public functions

equals

fun equals(o: Any!): Boolean

getFile

fun getFile(): File?

The local model file. If null is returned, use the download ID to check the download status.

Returns
File?

The local file associated with the model. If the original file download is still in progress, returns null. If a file update is in progress, returns the last fully downloaded model.

getSize

fun getSize(): Long

The size of the file currently associated with this model. If a download is in progress, this will be the size of the current model, not the new model currently being downloaded.

Returns
Long

The local model size.

hashCode

fun hashCode(): Int

toString

fun toString(): String

Public properties

downloadId

val downloadIdLong

downloadUrl

val downloadUrlString!

downloadUrlExpiry

val downloadUrlExpiryLong

localFilePath

val localFilePathString!

modelHash

val modelHashString!

name

val nameString!

Extension functions

component1

operator fun CustomModel.component1(): File?

component1

operator fun CustomModel.component1(): File?

component2

operator fun CustomModel.component2(): Long

component2

operator fun CustomModel.component2(): Long

component3

operator fun CustomModel.component3(): Long

component3

operator fun CustomModel.component3(): Long

component4

operator fun CustomModel.component4(): String

component4

operator fun CustomModel.component4(): String

component5

operator fun CustomModel.component5(): String

component5

operator fun CustomModel.component5(): String