Builder
class Builder
kotlin.Any | |
↳ | android.adservices.adselection.AdSelectionFromOutcomesConfig.Builder |
Builder for AdSelectionFromOutcomesConfig
objects. All fields require non-null values to build.
Summary
Public constructors | |
---|---|
Builder() |
Public methods | |
---|---|
AdSelectionFromOutcomesConfig |
build() Builds a |
AdSelectionFromOutcomesConfig.Builder |
setAdSelectionIds(adSelectionIds: MutableList<Long!>) Sets the list of |
AdSelectionFromOutcomesConfig.Builder |
setSelectionLogicUri(selectionLogicUri: Uri) Sets the |
AdSelectionFromOutcomesConfig.Builder |
setSelectionSignals(selectionSignals: AdSelectionSignals) Sets the |
AdSelectionFromOutcomesConfig.Builder |
setSeller(seller: AdTechIdentifier) Sets the seller |
Public constructors
Public methods
build
fun build(): AdSelectionFromOutcomesConfig
Builds a AdSelectionFromOutcomesConfig
instance.
Return | |
---|---|
AdSelectionFromOutcomesConfig |
This value cannot be null . |
setAdSelectionIds
fun setAdSelectionIds(adSelectionIds: MutableList<Long!>): AdSelectionFromOutcomesConfig.Builder
Sets the list of AdSelectionIds
to participate in the selection process.
Parameters | |
---|---|
adSelectionIds |
MutableList<Long!>: This value cannot be null . |
Return | |
---|---|
AdSelectionFromOutcomesConfig.Builder |
This value cannot be null . |
setSelectionLogicUri
fun setSelectionLogicUri(selectionLogicUri: Uri): AdSelectionFromOutcomesConfig.Builder
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
forselectOutcome
: 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 theAdSelectionFromOutcomesConfig#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
.
Parameters | |
---|---|
selectionLogicUri |
Uri: This value cannot be null . |
Return | |
---|---|
AdSelectionFromOutcomesConfig.Builder |
This value cannot be null . |
setSelectionSignals
fun setSelectionSignals(selectionSignals: AdSelectionSignals): AdSelectionFromOutcomesConfig.Builder
Sets the SelectionSignals
to be consumed by the JS script downloaded from SelectionLogicUri
Parameters | |
---|---|
selectionSignals |
AdSelectionSignals: This value cannot be null . |
Return | |
---|---|
AdSelectionFromOutcomesConfig.Builder |
This value cannot be null . |
setSeller
fun setSeller(seller: AdTechIdentifier): AdSelectionFromOutcomesConfig.Builder
Sets the seller AdTechIdentifier
.
Parameters | |
---|---|
seller |
AdTechIdentifier: This value cannot be null . |
Return | |
---|---|
AdSelectionFromOutcomesConfig.Builder |
This value cannot be null . |