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.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<AdTechIdentifier, AdSelectionSignals> 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 URI endpoint of sell-side trusted signal from which creative specific realtime information can be fetched from.  | 
  
Inherited methods | |
|---|---|
Public constructors
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. 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 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<AdTechIdentifier, AdSelectionSignals> 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 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 AdSelectionSignals.EMPTY will be passed to ad selection.
 
See AdSelectionConfig.getTrustedScoringSignalsUri() for more details.
| Parameters | |
|---|---|
trustedScoringSignalsUri | 
        
          Uri: This value cannot be null. | 
      
| Returns | |
|---|---|
AdSelectionConfig.Builder | 
        This value cannot be null. |