Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder for BytesPropertyConfig
.
Summary
Public constructors
Public methods
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-08-20 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-08-20 UTC."],[],[],null,["# AppSearchSchema.BytesPropertyConfig.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/AppSearchSchema.BytesPropertyConfig.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.AppSearchSchema.BytesPropertyConfig.Builder](#) |\n\nBuilder for [BytesPropertyConfig](/reference/kotlin/android/app/appsearch/AppSearchSchema.BytesPropertyConfig).\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Builder](#Builder(kotlin.String))`(`propertyName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Creates a new [BytesPropertyConfig.Builder](#). |\n\n| Public methods ||\n|--------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [AppSearchSchema.BytesPropertyConfig](/reference/kotlin/android/app/appsearch/AppSearchSchema.BytesPropertyConfig) | [build](#build())`()` Constructs a new [BytesPropertyConfig](/reference/kotlin/android/app/appsearch/AppSearchSchema.BytesPropertyConfig) from the contents of this builder. |\n| [AppSearchSchema.BytesPropertyConfig.Builder](#) | [setCardinality](#setCardinality(kotlin.Int))`(`cardinality:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Sets the cardinality of the property (whether it is optional, required or repeated). |\n| [AppSearchSchema.BytesPropertyConfig.Builder](#) | [setDescription](#setDescription(kotlin.String))`(`description:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Sets a natural language description of this property. |\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(propertyName: String)\n```\n\nCreates a new [BytesPropertyConfig.Builder](#).\n\n| Parameters ||\n|----------------|----------------------------------------------------------------------------------------------------------------|\n| `propertyName` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): This value cannot be `null`. |\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(): AppSearchSchema.BytesPropertyConfig\n```\n\nConstructs a new [BytesPropertyConfig](/reference/kotlin/android/app/appsearch/AppSearchSchema.BytesPropertyConfig) from the contents of this builder.\n\n| Return ||\n|--------------------------------------------------------------------------------------------------------------------|------------------------------|\n| [AppSearchSchema.BytesPropertyConfig](/reference/kotlin/android/app/appsearch/AppSearchSchema.BytesPropertyConfig) | This value cannot be `null`. |\n\n### setCardinality\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setCardinality(cardinality: Int): AppSearchSchema.BytesPropertyConfig.Builder\n```\n\nSets the cardinality of the property (whether it is optional, required or repeated).\n\nIf this method is not called, the default cardinality is [android.app.appsearch.AppSearchSchema.PropertyConfig#CARDINALITY_OPTIONAL](/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#CARDINALITY_OPTIONAL:kotlin.Int).\n\n| Parameters ||\n|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `cardinality` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): Value is [android.app.appsearch.AppSearchSchema.PropertyConfig#CARDINALITY_REPEATED](/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#CARDINALITY_REPEATED:kotlin.Int), [android.app.appsearch.AppSearchSchema.PropertyConfig#CARDINALITY_OPTIONAL](/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#CARDINALITY_OPTIONAL:kotlin.Int), or [android.app.appsearch.AppSearchSchema.PropertyConfig#CARDINALITY_REQUIRED](/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#CARDINALITY_REQUIRED:kotlin.Int) |\n\n| Return ||\n|--------------------------------------------------|------------------------------|\n| [AppSearchSchema.BytesPropertyConfig.Builder](#) | This value cannot be `null`. |\n\n### setDescription\n\nAdded in [T Extensions 18](https://developer.android.com/sdkExtensions) \n\n```\nfun setDescription(description: String): AppSearchSchema.BytesPropertyConfig.Builder\n```\n\nSets a natural language description of this property.\n\nFor more details about the description field, see [android.app.appsearch.AppSearchSchema.PropertyConfig#getDescription](/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#getDescription()).\n\n| Parameters ||\n|---------------|----------------------------------------------------------------------------------------------------------------|\n| `description` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): This value cannot be `null`. |\n\n| Return ||\n|--------------------------------------------------|------------------------------|\n| [AppSearchSchema.BytesPropertyConfig.Builder](#) | This value cannot be `null`. |"]]