Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [Ad Services Extensions 10](https://developer.android.com/sdkExtensions)  
Deprecated in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Builder

*** ** * ** ***

```
class Builder
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.adservices.adselection.AdSelectionFromOutcomesConfig.Builder](https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#) |

*** ** * ** ***

> [!CAUTION]
> **This class was deprecated in API level 37.**
>
> The Rubidium (Rb) Relevance APIs, including those in android.adservices.adselection, are being deprecated. Relevance APIs have no direct replacement. Developers should stop using them, as calls will be rejected in future Android releases. Please refer to official Privacy Sandbox documentation for deprecation and roadmap details: https://privacysandbox.com/news/update-on-plans-for-privacy-sandbox-technologies/

Builder for `https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig` objects. All fields require non-null values to build.

## Summary

| Public constructors ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#Builder()()` <br /> |

| Public methods ||
|---|---|
| [AdSelectionFromOutcomesConfig](https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig) | `https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#build()()` Builds a `https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig` instance. |
| [AdSelectionFromOutcomesConfig.Builder](https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#) | `https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#setAdSelectionIds(kotlin.collections.MutableList)(adSelectionIds: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html!>)` Sets the list of `AdSelectionIds` to participate in the selection process. |
| [AdSelectionFromOutcomesConfig.Builder](https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#) | `https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#setSelectionLogicUri(android.net.Uri)(selectionLogicUri: https://developer.android.com/reference/kotlin/android/net/Uri.html#)` Sets the `SelectionLogicUri`. |
| [AdSelectionFromOutcomesConfig.Builder](https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#) | `https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#setSelectionSignals(android.adservices.common.AdSelectionSignals)(selectionSignals: https://developer.android.com/reference/kotlin/android/adservices/common/AdSelectionSignals.html#)` Sets the `SelectionSignals` to be consumed by the JS script downloaded from `SelectionLogicUri` |
| [AdSelectionFromOutcomesConfig.Builder](https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#) | `https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#setSeller(android.adservices.common.AdTechIdentifier)(seller: https://developer.android.com/reference/kotlin/android/adservices/common/AdTechIdentifier.html#)` Sets the seller `https://developer.android.com/reference/kotlin/android/adservices/common/AdTechIdentifier.html#`. |

## Public constructors

### Builder

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [Ad Services Extensions 10](https://developer.android.com/sdkExtensions)

```
Builder()
```

## Public methods

### build

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [Ad Services Extensions 10](https://developer.android.com/sdkExtensions)  
Deprecated in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
fun build(): AdSelectionFromOutcomesConfig
```

**Deprecated:** *Deprecated in Java.*

Builds a `https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig` instance.

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig` | This value cannot be `null`. |

### setAdSelectionIds

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [Ad Services Extensions 10](https://developer.android.com/sdkExtensions)  
Deprecated in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
fun setAdSelectionIds(adSelectionIds: MutableList<Long!>): AdSelectionFromOutcomesConfig.Builder
```

**Deprecated:** *Deprecated in Java.*

Sets the list of `AdSelectionIds` to participate in the selection process.

| Parameters ||
|---|---|
| `adSelectionIds` | [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\<[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)!\>: This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#` | This value cannot be `null`. |

### setSelectionLogicUri

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [Ad Services Extensions 10](https://developer.android.com/sdkExtensions)  
Deprecated in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
fun setSelectionLogicUri(selectionLogicUri: Uri): AdSelectionFromOutcomesConfig.Builder
```

**Deprecated:** *Deprecated in Java.*

Sets the `SelectionLogicUri`. Selection URI could be either of the two schemas:

- **HTTPS:** HTTPS URIs have to be absolute URIs where the host matches the `seller`
- **Ad Selection Prebuilt:** Ad Selection Service URIs follow `ad-selection-prebuilt://ad-selection-from-outcomes/<name>?<script-generation-parameters>` format. FLEDGE generates the appropriate JS script without the need for a network call.

  Available prebuilt scripts:
  - **`waterfall-mediation-truncation` for `selectOutcome`:** This JS implements Waterfall mediation truncation logic. Mediation SDK's ad is returned if its bid greater than or equal to the bid floor. Below parameter(s) are required to use this prebuilt:
    - **`bidFloor`:** Key of the bid floor value passed in the `https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig#getSelectionSignals()` that will be compared against mediation SDK's winner ad.

    Ex. If your selection signals look like `{"bid_floor": 10}` then, `ad-selection-prebuilt://ad-selection-from-outcomes/waterfall-mediation-truncation/?bidFloor=bid_floor`

`AdSelectionIds` and `SelectionSignals`.

<br />

| Parameters ||
|---|---|
| `selectionLogicUri` | [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#): This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#` | This value cannot be `null`. |

### setSelectionSignals

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [Ad Services Extensions 10](https://developer.android.com/sdkExtensions)  
Deprecated in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
fun setSelectionSignals(selectionSignals: AdSelectionSignals): AdSelectionFromOutcomesConfig.Builder
```

**Deprecated:** *Deprecated in Java.*

Sets the `SelectionSignals` to be consumed by the JS script downloaded from `SelectionLogicUri`

| Parameters ||
|---|---|
| `selectionSignals` | [AdSelectionSignals](https://developer.android.com/reference/kotlin/android/adservices/common/AdSelectionSignals.html#): This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#` | This value cannot be `null`. |

### setSeller

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [Ad Services Extensions 10](https://developer.android.com/sdkExtensions)  
Deprecated in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
fun setSeller(seller: AdTechIdentifier): AdSelectionFromOutcomesConfig.Builder
```

**Deprecated:** *Deprecated in Java.*

Sets the seller `https://developer.android.com/reference/kotlin/android/adservices/common/AdTechIdentifier.html#`.

| Parameters ||
|---|---|
| `seller` | [AdTechIdentifier](https://developer.android.com/reference/kotlin/android/adservices/common/AdTechIdentifier.html#): This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#` | This value cannot be `null`. |