Builder
class Builder
kotlin.Any | |
↳ | android.adservices.customaudience.CustomAudience.Builder |
Builder for CustomAudience
objects.
Summary
Public constructors | |
---|---|
Builder() |
Public methods | |
---|---|
CustomAudience |
build() Builds an instance of a |
CustomAudience.Builder |
setActivationTime(activationTime: Instant?) Sets the time, truncated to milliseconds, after which the |
CustomAudience.Builder |
setAds(ads: MutableList<AdData!>?) Sets the initial remarketing ads served by the custom audience. |
CustomAudience.Builder |
setAuctionServerRequestFlags(auctionServerRequestFlags: Int) Sets the bitfield of auction server request flags. |
CustomAudience.Builder |
setBiddingLogicUri(biddingLogicUri: Uri) Sets the URI to fetch bidding logic from for use in the ad selection process. |
CustomAudience.Builder |
setBuyer(buyer: AdTechIdentifier) Sets the buyer |
CustomAudience.Builder |
setDailyUpdateUri(dailyUpdateUri: Uri) Sets the daily update URI. |
CustomAudience.Builder |
setExpirationTime(expirationTime: Instant?) Sets the time, truncated to milliseconds, after which the |
CustomAudience.Builder |
Sets the |
CustomAudience.Builder |
setTrustedBiddingData(trustedBiddingData: TrustedBiddingData?) Sets the trusted bidding data to be queried and used in the ad selection process. |
CustomAudience.Builder |
setUserBiddingSignals(userBiddingSignals: AdSelectionSignals?) Sets the user bidding signals used in the ad selection process. |
Public constructors
Public methods
build
fun build(): CustomAudience
Builds an instance of a CustomAudience
.
Return | |
---|---|
CustomAudience |
This value cannot be null . |
Exceptions | |
---|---|
java.lang.NullPointerException |
if any non-null parameter is null |
java.lang.IllegalArgumentException |
if the expiration time is set before the current time |
setActivationTime
fun setActivationTime(activationTime: Instant?): CustomAudience.Builder
Sets the time, truncated to milliseconds, after which the CustomAudience
will serve ads.
Set to null
in order for this CustomAudience
to be immediately active and participate in ad selection.
See getActivationTime()
for more information.
Parameters | |
---|---|
activationTime |
Instant?: This value may be null . |
setAds
fun setAds(ads: MutableList<AdData!>?): CustomAudience.Builder
Sets the initial remarketing ads served by the custom audience. Will be assigned with an empty list if not provided.
See getAds()
for more information.
Parameters | |
---|---|
ads |
MutableList<AdData!>?: This value may be null . |
Return | |
---|---|
CustomAudience.Builder |
This value cannot be null . |
setAuctionServerRequestFlags
fun setAuctionServerRequestFlags(auctionServerRequestFlags: Int): CustomAudience.Builder
Sets the bitfield of auction server request flags.
See getAuctionServerRequestFlags()
for more information.
Parameters | |
---|---|
auctionServerRequestFlags |
Int: Value is either 0 or a combination of android.adservices.customaudience.CustomAudience.FLAG_AUCTION_SERVER_REQUEST_DEFAULT, and android.adservices.customaudience.CustomAudience#FLAG_AUCTION_SERVER_REQUEST_OMIT_ADS |
Return | |
---|---|
CustomAudience.Builder |
This value cannot be null . |
setBiddingLogicUri
fun setBiddingLogicUri(biddingLogicUri: Uri): CustomAudience.Builder
Sets the URI to fetch bidding logic from for use in the ad selection process. The URI must use HTTPS.
See getBiddingLogicUri()
for more information.
Parameters | |
---|---|
biddingLogicUri |
Uri: This value cannot be null . |
Return | |
---|---|
CustomAudience.Builder |
This value cannot be null . |
setBuyer
fun setBuyer(buyer: AdTechIdentifier): CustomAudience.Builder
Sets the buyer AdTechIdentifier
.
See getBuyer()
for more information.
Parameters | |
---|---|
buyer |
AdTechIdentifier: This value cannot be null . |
Return | |
---|---|
CustomAudience.Builder |
This value cannot be null . |
setDailyUpdateUri
fun setDailyUpdateUri(dailyUpdateUri: Uri): CustomAudience.Builder
Sets the daily update URI. The URI must use HTTPS.
See getDailyUpdateUri()
for more information.
Parameters | |
---|---|
dailyUpdateUri |
Uri: This value cannot be null . |
Return | |
---|---|
CustomAudience.Builder |
This value cannot be null . |
setExpirationTime
fun setExpirationTime(expirationTime: Instant?): CustomAudience.Builder
Sets the time, truncated to milliseconds, after which the CustomAudience
should be removed.
See getExpirationTime()
for more information.
Parameters | |
---|---|
expirationTime |
Instant?: This value may be null . |
Return | |
---|---|
CustomAudience.Builder |
This value cannot be null . |
setName
fun setName(name: String): CustomAudience.Builder
Sets the CustomAudience
object's name.
See getName()
for more information.
Parameters | |
---|---|
name |
String: This value cannot be null . |
Return | |
---|---|
CustomAudience.Builder |
This value cannot be null . |
setTrustedBiddingData
fun setTrustedBiddingData(trustedBiddingData: TrustedBiddingData?): CustomAudience.Builder
Sets the trusted bidding data to be queried and used in the ad selection process.
See getTrustedBiddingData()
for more information.
Parameters | |
---|---|
trustedBiddingData |
TrustedBiddingData?: This value may be null . |
Return | |
---|---|
CustomAudience.Builder |
This value cannot be null . |
setUserBiddingSignals
fun setUserBiddingSignals(userBiddingSignals: AdSelectionSignals?): CustomAudience.Builder
Sets the user bidding signals used in the ad selection process.
See getUserBiddingSignals()
for more information.
Parameters | |
---|---|
userBiddingSignals |
AdSelectionSignals?: This value may be null . |
Return | |
---|---|
CustomAudience.Builder |
This value cannot be null . |