Builder
class Builder
| kotlin.Any | |
| ↳ | android.adservices.adselection.AdSelectionConfig.Builder |
Builder for AdSelectionConfig object.
Summary
| Public constructors | |
|---|---|
Builder() |
|
| Public methods | |
|---|---|
| AdSelectionConfig |
build()Builds an |
| AdSelectionConfig.Builder |
setAdSelectionSignals(adSelectionSignals: AdSelectionSignals)Sets the signals provided to buyers during ad selection bid generation. |
| AdSelectionConfig.Builder |
setCustomAudienceBuyers(customAudienceBuyers: MutableList<AdTechIdentifier!>)Sets the list of allowed buyers. |
| AdSelectionConfig.Builder |
setDecisionLogicUri(decisionLogicUri: Uri)Sets the URI used to fetch decision logic for use in the ad selection process. |
| AdSelectionConfig.Builder |
setPerBuyerSignals(perBuyerSignals: MutableMap<AdTechIdentifier!, AdSelectionSignals!>)Sets the signals provided by each buyer during ad selection. |
| AdSelectionConfig.Builder |
setPerBuyerSignedContextualAds(buyerSignedContextualAds: MutableMap<AdTechIdentifier!, SignedContextualAds!>)Sets the contextual Ads corresponding to each buyer during ad selection. |
| AdSelectionConfig.Builder |
setSeller(seller: AdTechIdentifier)Sets the seller identifier. |
| AdSelectionConfig.Builder |
setSellerSignals(sellerSignals: AdSelectionSignals)Set the signals used to modify ad selection results. |
| AdSelectionConfig.Builder |
setTrustedScoringSignalsUri(trustedScoringSignalsUri: Uri)Sets the URI endpoint of sell-side trusted signal from which creative specific realtime information can be fetched from. |
Public constructors
Public methods
build
fun build(): AdSelectionConfig
Builds an AdSelectionConfig instance.
| Return | |
|---|---|
AdSelectionConfig |
This value cannot be null. |
| Exceptions | |
|---|---|
java.lang.NullPointerException |
if any required params are null |
setAdSelectionSignals
fun setAdSelectionSignals(adSelectionSignals: AdSelectionSignals): AdSelectionConfig.Builder
Sets the signals provided to buyers during ad selection bid generation.
If not set, defaults to the empty JSON.
See getAdSelectionSignals() for more details.
| Parameters | |
|---|---|
adSelectionSignals |
AdSelectionSignals: This value cannot be null. |
| Return | |
|---|---|
AdSelectionConfig.Builder |
This value cannot be null. |
setCustomAudienceBuyers
fun setCustomAudienceBuyers(customAudienceBuyers: MutableList<AdTechIdentifier!>): AdSelectionConfig.Builder
Sets the list of allowed buyers.
See getCustomAudienceBuyers() for more details.
| Parameters | |
|---|---|
customAudienceBuyers |
MutableList<AdTechIdentifier!>: This value cannot be null. |
| Return | |
|---|---|
AdSelectionConfig.Builder |
This value cannot be null. |
setDecisionLogicUri
fun setDecisionLogicUri(decisionLogicUri: Uri): AdSelectionConfig.Builder
Sets the URI used to fetch decision logic for use in the ad selection process. Decision 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/<name>?<script-generation-parameters>format. FLEDGE generates the appropriate JS script without the need for a network call.Available prebuilt scripts:
highest-bid-winsforscoreAdsandreportResult: This JS picks the ad with the highest bid for scoring. For reporting, the given URI is parameterized withrender_uriandbid. Below parameter(s) are required to use this prebuilt:reportingUrl: Base reporting uri that will be parameterized later withrender_uriandbid
Ex. If your base reporting URL is "https://www.ssp.com" then,
ad-selection-prebuilt://ad-selection/highest-bid-wins/?reportingUrl=https://www.ssp.com
See getDecisionLogicUri() for more details.
| Parameters | |
|---|---|
decisionLogicUri |
Uri: This value cannot be null. |
| Return | |
|---|---|
AdSelectionConfig.Builder |
This value cannot be null. |
setPerBuyerSignals
fun setPerBuyerSignals(perBuyerSignals: MutableMap<AdTechIdentifier!, AdSelectionSignals!>): AdSelectionConfig.Builder
Sets the signals provided by each buyer during ad selection.
If not set, defaults to an empty map.
See getPerBuyerSignals() for more details.
| Parameters | |
|---|---|
perBuyerSignals |
MutableMap<AdTechIdentifier!, AdSelectionSignals!>: This value cannot be null. |
| Return | |
|---|---|
AdSelectionConfig.Builder |
This value cannot be null. |
setPerBuyerSignedContextualAds
fun setPerBuyerSignedContextualAds(buyerSignedContextualAds: MutableMap<AdTechIdentifier!, SignedContextualAds!>): AdSelectionConfig.Builder
Sets the contextual Ads corresponding to each buyer during ad selection.
If not set, defaults to an empty map.
See getPerBuyerSignedContextualAds() for more details.
| Parameters | |
|---|---|
buyerSignedContextualAds |
MutableMap<AdTechIdentifier!, SignedContextualAds!>: This value cannot be null. |
| Return | |
|---|---|
AdSelectionConfig.Builder |
This value cannot be null. |
setSeller
fun setSeller(seller: AdTechIdentifier): AdSelectionConfig.Builder
Sets the seller identifier.
See getSeller() for more details.
| Parameters | |
|---|---|
seller |
AdTechIdentifier: This value cannot be null. |
| Return | |
|---|---|
AdSelectionConfig.Builder |
This value cannot be null. |
setSellerSignals
fun setSellerSignals(sellerSignals: AdSelectionSignals): AdSelectionConfig.Builder
Set the signals used to modify ad selection results.
If not set, defaults to the empty JSON.
See getSellerSignals() for more details.
| Parameters | |
|---|---|
sellerSignals |
AdSelectionSignals: This value cannot be null. |
| Return | |
|---|---|
AdSelectionConfig.Builder |
This value cannot be null. |
setTrustedScoringSignalsUri
fun setTrustedScoringSignalsUri(trustedScoringSignalsUri: Uri): AdSelectionConfig.Builder
Sets the URI endpoint of sell-side trusted signal from which creative specific realtime information can be fetched from.
If Uri.EMPTY is passed then network call will be skipped and android.adservices.common.AdSelectionSignals#EMPTY will be passed to ad selection.
See getTrustedScoringSignalsUri() for more details.
| Parameters | |
|---|---|
trustedScoringSignalsUri |
Uri: This value cannot be null. |
| Return | |
|---|---|
AdSelectionConfig.Builder |
This value cannot be null. |