[**Added in Android UpsideDownCakePrivacySandbox**](https://developer.android.com/preview)  
Summary: [Ctors](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#pubctors) \| [Methods](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#inhmethods)  

# AdSelectionFromOutcomesConfig.Builder


`
public
static
final

class
AdSelectionFromOutcomesConfig.Builder
`


`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


`

`


`

|---|----------------------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.adservices.adselection.AdSelectionFromOutcomesConfig.Builder |

<br />

*** ** * ** ***

Builder for [AdSelectionFromOutcomesConfig](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig) objects. All fields require non-null values
to build.

## Summary

|                                                                        ### Public constructors                                                                         ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[Builder](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#Builder())`() ` |

|                                                                                                                                                                                                                                                                                                                                        ### Public methods                                                                                                                                                                                                                                                                                                                                        ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[AdSelectionFromOutcomesConfig](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig)                 | ` `[build](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#build())`() ` Builds a [AdSelectionFromOutcomesConfig](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig) instance.                                                                                                                                                           |
| ` `[AdSelectionFromOutcomesConfig.Builder](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig.Builder) | ` `[setAdSelectionIds](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#setAdSelectionIds(java.util.List<java.lang.Long>))`(`[List](https://developer.android.com/reference/java/util/List)`<`[Long](https://developer.android.com/reference/java/lang/Long)`> adSelectionIds) ` Sets the list of `AdSelectionIds` to participate in the selection process.                                                            |
| ` `[AdSelectionFromOutcomesConfig.Builder](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig.Builder) | ` `[setSelectionLogicUri](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#setSelectionLogicUri(android.net.Uri))`(`[Uri](https://developer.android.com/reference/android/net/Uri)` selectionLogicUri) ` Sets the `SelectionLogicUri`.                                                                                                                                                                                 |
| ` `[AdSelectionFromOutcomesConfig.Builder](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig.Builder) | ` `[setSelectionSignals](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#setSelectionSignals(android.adservices.common.AdSelectionSignals))`(`[AdSelectionSignals](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/common/AdSelectionSignals)` selectionSignals) ` Sets the `SelectionSignals` to be consumed by the JS script downloaded from `SelectionLogicUri`               |
| ` `[AdSelectionFromOutcomesConfig.Builder](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig.Builder) | ` `[setSeller](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig.Builder#setSeller(android.adservices.common.AdTechIdentifier))`(`[AdTechIdentifier](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/common/AdTechIdentifier)` seller) ` Sets the seller [AdTechIdentifier](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/common/AdTechIdentifier). |

| ### Inherited methods |
|-----------------------|---|
| From class ` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                        | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                             | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                            | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`.                                                                                                                                                 | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                   | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                              | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                           | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                              | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.                                                                                             | ||

## Public constructors

### Builder

[**Added in Android UpsideDownCakePrivacySandbox**](https://developer.android.com/preview)  

```
public Builder ()
```

<br />

<br />

## Public methods

### build

[**Added in Android UpsideDownCakePrivacySandbox**](https://developer.android.com/preview)  

```
public AdSelectionFromOutcomesConfig build ()
```

Builds a [AdSelectionFromOutcomesConfig](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig) instance.

<br />

|                                                                                               Returns                                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------|
| [AdSelectionFromOutcomesConfig](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig) | This value cannot be `null`. <br /> |

### setAdSelectionIds

[**Added in Android UpsideDownCakePrivacySandbox**](https://developer.android.com/preview)  

```
public AdSelectionFromOutcomesConfig.Builder setAdSelectionIds (List<Long> adSelectionIds)
```

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

<br />

|                          Parameters                           ||
|------------------|---------------------------------------------|
| `adSelectionIds` | `List`: This value cannot be `null`. <br /> |

|                                                                                                       Returns                                                                                                        ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------|
| [AdSelectionFromOutcomesConfig.Builder](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig.Builder) | This value cannot be `null`. <br /> |

### setSelectionLogicUri

[**Added in Android UpsideDownCakePrivacySandbox**](https://developer.android.com/preview)  

```
public AdSelectionFromOutcomesConfig.Builder setSelectionLogicUri (Uri selectionLogicUri)
```

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 [AdSelectionFromOutcomesConfig#getSelectionSignals()](https://developer.android.com/design-for-safety/privacy-sandbox/reference/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 />

<br />

|                           Parameters                            ||
|---------------------|--------------------------------------------|
| `selectionLogicUri` | `Uri`: This value cannot be `null`. <br /> |

|                                                                                                       Returns                                                                                                        ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------|
| [AdSelectionFromOutcomesConfig.Builder](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig.Builder) | This value cannot be `null`. <br /> |

### setSelectionSignals

[**Added in Android UpsideDownCakePrivacySandbox**](https://developer.android.com/preview)  

```
public AdSelectionFromOutcomesConfig.Builder setSelectionSignals (AdSelectionSignals selectionSignals)
```

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

<br />

|                                  Parameters                                   ||
|--------------------|-----------------------------------------------------------|
| `selectionSignals` | `AdSelectionSignals`: This value cannot be `null`. <br /> |

|                                                                                                       Returns                                                                                                        ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------|
| [AdSelectionFromOutcomesConfig.Builder](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig.Builder) | This value cannot be `null`. <br /> |

### setSeller

[**Added in Android UpsideDownCakePrivacySandbox**](https://developer.android.com/preview)  

```
public AdSelectionFromOutcomesConfig.Builder setSeller (AdTechIdentifier seller)
```

Sets the seller [AdTechIdentifier](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/common/AdTechIdentifier).

<br />

|                            Parameters                             ||
|----------|---------------------------------------------------------|
| `seller` | `AdTechIdentifier`: This value cannot be `null`. <br /> |

|                                                                                                       Returns                                                                                                        ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------|
| [AdSelectionFromOutcomesConfig.Builder](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionFromOutcomesConfig.Builder) | This value cannot be `null`. <br /> |