SignedContextualAds.Builder


public static final class SignedContextualAds.Builder
extends Object

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


Builder for SignedContextualAds object

Summary

Public constructors

Builder()
Builder(SignedContextualAds signedContextualAds)

Returns a SignedContextualAds.Builder from a SignedContextualAds.

Public methods

SignedContextualAds build()

Builds a SignedContextualAds instance.

SignedContextualAds.Builder setAdsWithBid(List<AdWithBid> adsWithBid)

Sets the Ads with pre-defined bid values

See SignedContextualAds.getAdsWithBid() for more details

SignedContextualAds.Builder setBuyer(AdTechIdentifier buyer)

Sets the buyer Ad tech Identifier

See SignedContextualAds.getBuyer() for more details

SignedContextualAds.Builder setDecisionLogicUri(Uri decisionLogicUri)

Sets the URI to fetch the decision logic used in ad selection and reporting

See SignedContextualAds.getDecisionLogicUri() for more details

SignedContextualAds.Builder setSignature(byte[] signature)

Sets the copied signature

Inherited methods

Public constructors

Builder

public Builder ()

Builder

public Builder (SignedContextualAds signedContextualAds)

Returns a SignedContextualAds.Builder from a SignedContextualAds.

Parameters
signedContextualAds SignedContextualAds: This value cannot be null.

Public methods

build

public SignedContextualAds build ()

Builds a SignedContextualAds instance.

Returns
SignedContextualAds This value cannot be null.

Throws
NullPointerException if any required params are null

setAdsWithBid

public SignedContextualAds.Builder setAdsWithBid (List<AdWithBid> adsWithBid)

Sets the Ads with pre-defined bid values

See SignedContextualAds.getAdsWithBid() for more details

Parameters
adsWithBid List: This value cannot be null.

Returns
SignedContextualAds.Builder This value cannot be null.

setBuyer

public SignedContextualAds.Builder setBuyer (AdTechIdentifier buyer)

Sets the buyer Ad tech Identifier

See SignedContextualAds.getBuyer() for more details

Parameters
buyer AdTechIdentifier: This value cannot be null.

Returns
SignedContextualAds.Builder This value cannot be null.

setDecisionLogicUri

public SignedContextualAds.Builder setDecisionLogicUri (Uri decisionLogicUri)

Sets the URI to fetch the decision logic used in ad selection and reporting

See SignedContextualAds.getDecisionLogicUri() for more details

Parameters
decisionLogicUri Uri: This value cannot be null.

Returns
SignedContextualAds.Builder This value cannot be null.

setSignature

public SignedContextualAds.Builder setSignature (byte[] signature)

Sets the copied signature

Parameters
signature byte: This value cannot be null.

Returns
SignedContextualAds.Builder This value cannot be null.