Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder for StorageInfo
objects.
Summary
Public constructors
Public methods
setAliveDocumentsCount
fun setAliveDocumentsCount(aliveDocumentsCount: Int): StorageInfo.Builder
Sets the number of alive documents.
setAliveNamespacesCount
fun setAliveNamespacesCount(aliveNamespacesCount: Int): StorageInfo.Builder
Sets the number of alive namespaces.
setBlobsSizeBytes
fun setBlobsSizeBytes(blobsSizeBytes: Long): StorageInfo.Builder
Sets the size of stored blobs in bytes.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-03-13 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-13 UTC."],[],[],null,["# StorageInfo.Builder\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/app/appsearch/StorageInfo.Builder \"View this page in Java\") \n\n```\nclass Builder\n```\n\n|---|------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.app.appsearch.StorageInfo.Builder](#) |\n\nBuilder for [StorageInfo](/reference/kotlin/android/app/appsearch/StorageInfo) objects.\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------|---|\n| [Builder](#Builder())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|--------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [StorageInfo](/reference/kotlin/android/app/appsearch/StorageInfo) | [build](#build())`()` Builds a [StorageInfo](/reference/kotlin/android/app/appsearch/StorageInfo) object. |\n| [StorageInfo.Builder](#) | [setAliveDocumentsCount](#setAliveDocumentsCount(kotlin.Int))`(`aliveDocumentsCount:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Sets the number of alive documents. |\n| [StorageInfo.Builder](#) | [setAliveNamespacesCount](#setAliveNamespacesCount(kotlin.Int))`(`aliveNamespacesCount:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Sets the number of alive namespaces. |\n| [StorageInfo.Builder](#) | [setBlobsCount](#setBlobsCount(kotlin.Int))`(`blobsCount:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Sets the number of stored blobs. |\n| [StorageInfo.Builder](#) | [setBlobsSizeBytes](#setBlobsSizeBytes(kotlin.Long))`(`blobsSizeBytes:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` Sets the size of stored blobs in bytes. |\n| [StorageInfo.Builder](#) | [setSizeBytes](#setSizeBytes(kotlin.Long))`(`sizeBytes:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` Sets the size in bytes. |\n\nPublic constructors\n-------------------\n\n### Builder\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBuilder()\n```\n\nPublic methods\n--------------\n\n### build\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun build(): StorageInfo\n```\n\nBuilds a [StorageInfo](/reference/kotlin/android/app/appsearch/StorageInfo) object.\n\n| Return ||\n|--------------------------------------------------------------------|------------------------------|\n| [StorageInfo](/reference/kotlin/android/app/appsearch/StorageInfo) | This value cannot be `null`. |\n\n### setAliveDocumentsCount\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setAliveDocumentsCount(aliveDocumentsCount: Int): StorageInfo.Builder\n```\n\nSets the number of alive documents.\n\n| Return ||\n|--------------------------|------------------------------|\n| [StorageInfo.Builder](#) | This value cannot be `null`. |\n\n### setAliveNamespacesCount\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setAliveNamespacesCount(aliveNamespacesCount: Int): StorageInfo.Builder\n```\n\nSets the number of alive namespaces.\n\n| Return ||\n|--------------------------|------------------------------|\n| [StorageInfo.Builder](#) | This value cannot be `null`. |\n\n### setBlobsCount\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [T Extensions 17](https://developer.android.com/sdkExtensions) \n\n```\nfun setBlobsCount(blobsCount: Int): StorageInfo.Builder\n```\n\nSets the number of stored blobs.\n\n| Return ||\n|--------------------------|------------------------------|\n| [StorageInfo.Builder](#) | This value cannot be `null`. |\n\n### setBlobsSizeBytes\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [T Extensions 17](https://developer.android.com/sdkExtensions) \n\n```\nfun setBlobsSizeBytes(blobsSizeBytes: Long): StorageInfo.Builder\n```\n\nSets the size of stored blobs in bytes.\n\n| Return ||\n|--------------------------|------------------------------|\n| [StorageInfo.Builder](#) | This value cannot be `null`. |\n\n### setSizeBytes\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setSizeBytes(sizeBytes: Long): StorageInfo.Builder\n```\n\nSets the size in bytes.\n\n| Return ||\n|--------------------------|------------------------------|\n| [StorageInfo.Builder](#) | This value cannot be `null`. |"]]