Stay organized with collections Save and categorize content based on your preferences.

AdSelectionConfig.Builder

public static final class AdSelectionConfig.Builder
extends Object

java.lang.Object
   ↳ android.adservices.adselection.AdSelectionConfig.Builder


Builder for AdSelectionConfig object.

Summary

Public constructors

Builder()

Public methods

AdSelectionConfig build()

Builds an AdSelectionConfig instance.

AdSelectionConfig.Builder setAdSelectionSignals(AdSelectionSignals adSelectionSignals)

Sets the signals provided to buyers during ad selection bid generation.

AdSelectionConfig.Builder setCustomAudienceBuyers(List<AdTechIdentifier> customAudienceBuyers)

Sets the list of allowed buyers.

AdSelectionConfig.Builder setDecisionLogicUri(Uri decisionLogicUri)

Sets the URI used to fetch decision logic for use in the ad selection process.

AdSelectionConfig.Builder setPerBuyerSignals(Map<AdTechIdentifierAdSelectionSignals> perBuyerSignals)

Sets the signals provided by each buyer during ad selection.

AdSelectionConfig.Builder setSeller(AdTechIdentifier seller)

Sets the seller identifier.

AdSelectionConfig.Builder setSellerSignals(AdSelectionSignals sellerSignals)

Set the signals used to modify ad selection results.

AdSelectionConfig.Builder setTrustedScoringSignalsUri(Uri trustedScoringSignalsUri)

Sets the URL endpoint of sell-side trusted signal from which creative specific realtime information can be fetched from.

Inherited methods

Public constructors

Builder

public Builder ()

Public methods

build

public AdSelectionConfig build ()

Builds an AdSelectionConfig instance.

Returns
AdSelectionConfig This value cannot be null.

Throws
NullPointerException if any required params are null

setAdSelectionSignals

public AdSelectionConfig.Builder setAdSelectionSignals (AdSelectionSignals adSelectionSignals)

Sets the signals provided to buyers during ad selection bid generation.

If not set, defaults to the empty JSON.

See AdSelectionConfig.getAdSelectionSignals() for more details.

Parameters
adSelectionSignals AdSelectionSignals: This value cannot be null.

Returns
AdSelectionConfig.Builder This value cannot be null.

setCustomAudienceBuyers

public AdSelectionConfig.Builder setCustomAudienceBuyers (List<AdTechIdentifier> customAudienceBuyers)

Sets the list of allowed buyers.

See AdSelectionConfig.getCustomAudienceBuyers() for more details.

Parameters
customAudienceBuyers List: This value cannot be null.

Returns
AdSelectionConfig.Builder This value cannot be null.

setDecisionLogicUri

public AdSelectionConfig.Builder setDecisionLogicUri (Uri decisionLogicUri)

Sets the URI used to fetch decision logic for use in the ad selection process.

See AdSelectionConfig.getDecisionLogicUri() for more details.

Parameters
decisionLogicUri Uri: This value cannot be null.

Returns
AdSelectionConfig.Builder This value cannot be null.

setPerBuyerSignals

public AdSelectionConfig.Builder setPerBuyerSignals (Map<AdTechIdentifierAdSelectionSignals> perBuyerSignals)

Sets the signals provided by each buyer during ad selection.

If not set, defaults to an empty map.

See AdSelectionConfig.getPerBuyerSignals() for more details.

Parameters
perBuyerSignals Map: This value cannot be null.

Returns
AdSelectionConfig.Builder This value cannot be null.

setSeller

public AdSelectionConfig.Builder setSeller (AdTechIdentifier seller)

Sets the seller identifier.

See AdSelectionConfig.getSeller() for more details.

Parameters
seller AdTechIdentifier: This value cannot be null.

Returns
AdSelectionConfig.Builder This value cannot be null.

setSellerSignals

public AdSelectionConfig.Builder setSellerSignals (AdSelectionSignals sellerSignals)

Set the signals used to modify ad selection results.

If not set, defaults to the empty JSON.

See AdSelectionConfig.getSellerSignals() for more details.

Parameters
sellerSignals AdSelectionSignals: This value cannot be null.

Returns
AdSelectionConfig.Builder This value cannot be null.

setTrustedScoringSignalsUri

public AdSelectionConfig.Builder setTrustedScoringSignalsUri (Uri trustedScoringSignalsUri)

Sets the URL endpoint of sell-side trusted signal from which creative specific realtime information can be fetched from.

See AdSelectionConfig.getTrustedScoringSignalsUri() for more details.

Parameters
trustedScoringSignalsUri Uri: This value cannot be null.

Returns
AdSelectionConfig.Builder This value cannot be null.