Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder for PerBuyerConfiguration
objects.
Summary
Public constructors |
Creates a new Builder .
|
Public constructors
Builder
Builder()
Creates a new Builder
.
Public methods
fun setTargetInputSizeBytes(targetInputSizeB: Int): PerBuyerConfiguration.Builder
Sets the target input size in bytes for this configuration.
If this is not explicitly set, this buyer will share remaining space after other buyers' target sizes are respected. See getTargetInputSizeBytes()
for more details.
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.
[null,null,["Last updated 2025-08-20 UTC."],[],[],null,["# PerBuyerConfiguration.Builder\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 14](https://developer.android.com/sdkExtensions)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/adservices/adselection/PerBuyerConfiguration.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.adservices.adselection.PerBuyerConfiguration.Builder](#) |\n\nBuilder for [PerBuyerConfiguration](/reference/kotlin/android/adservices/adselection/PerBuyerConfiguration) objects.\n\nSummary\n-------\n\n| Public constructors ||\n|-------------------------------------------------------|---|\n| [Builder](#Builder())`()` Creates a new [Builder](#). |\n\n| Public methods ||\n|-------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [PerBuyerConfiguration](/reference/kotlin/android/adservices/adselection/PerBuyerConfiguration) | [build](#build())`()` Builds a [PerBuyerConfiguration](/reference/kotlin/android/adservices/adselection/PerBuyerConfiguration) instance. |\n| [PerBuyerConfiguration.Builder](#) | [setBuyer](#setBuyer(android.adservices.common.AdTechIdentifier))`(`buyer:` `[AdTechIdentifier](../common/AdTechIdentifier.html#)`)` Sets the buyer for this configuration. |\n| [PerBuyerConfiguration.Builder](#) | [setTargetInputSizeBytes](#setTargetInputSizeBytes(kotlin.Int))`(`targetInputSizeB:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Sets the target input size in bytes for this configuration. |\n\nPublic constructors\n-------------------\n\n### Builder\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 14](https://developer.android.com/sdkExtensions) \n\n```\nBuilder()\n```\n\nCreates a new [Builder](#).\n\nPublic methods\n--------------\n\n### build\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 14](https://developer.android.com/sdkExtensions) \n\n```\nfun build(): PerBuyerConfiguration\n```\n\nBuilds a [PerBuyerConfiguration](/reference/kotlin/android/adservices/adselection/PerBuyerConfiguration) instance.\n\n| Return ||\n|-------------------------------------------------------------------------------------------------|------------------------------|\n| [PerBuyerConfiguration](/reference/kotlin/android/adservices/adselection/PerBuyerConfiguration) | This value cannot be `null`. |\n\n### setBuyer\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 14](https://developer.android.com/sdkExtensions) \n\n```\nfun setBuyer(buyer: AdTechIdentifier): PerBuyerConfiguration.Builder\n```\n\nSets the buyer for this configuration. See [getBuyer()](/reference/kotlin/android/adservices/adselection/PerBuyerConfiguration#getBuyer()) for more details.\n\n| Parameters ||\n|---------|------------------------------------------------------------------------------------|\n| `buyer` | [AdTechIdentifier](../common/AdTechIdentifier.html#): This value cannot be `null`. |\n\n| Return ||\n|------------------------------------|------------------------------|\n| [PerBuyerConfiguration.Builder](#) | This value cannot be `null`. |\n\n### setTargetInputSizeBytes\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 14](https://developer.android.com/sdkExtensions) \n\n```\nfun setTargetInputSizeBytes(targetInputSizeB: Int): PerBuyerConfiguration.Builder\n```\n\nSets the target input size in bytes for this configuration.\n\nIf this is not explicitly set, this buyer will share remaining space after other buyers' target sizes are respected. See [getTargetInputSizeBytes()](/reference/kotlin/android/adservices/adselection/PerBuyerConfiguration#getTargetInputSizeBytes()) for more details.\n\n| Parameters ||\n|--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `targetInputSizeB` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): Value is between 0 and [java.lang.Integer#MAX_VALUE](../../../java/lang/Integer.html#MAX_VALUE:kotlin.Int) inclusive |\n\n| Return ||\n|------------------------------------|------------------------------|\n| [PerBuyerConfiguration.Builder](#) | This value cannot be `null`. |"]]