class CustomAudience


Represents the information necessary for a custom audience to participate in ad selection.

A custom audience is an abstract grouping of users with similar demonstrated interests. This class is a collection of some data stored on a device that is necessary to serve advertisements targeting a single custom audience.

Summary

Nested types

Builder for CustomAudience objects.

Constants

const Int

Default value for auction server request flag.

const Int

This auction server request flag indicates to the service that ads for this Custom Audience can be omitted in the server auction payload.

const Double

Default priority for this custom audience.

Public constructors

CustomAudience(
    buyer: AdTechIdentifier,
    name: String,
    dailyUpdateUri: Uri,
    biddingLogicUri: Uri,
    ads: List<AdData>,
    activationTime: Instant?,
    expirationTime: Instant?,
    userBiddingSignals: AdSelectionSignals?,
    trustedBiddingSignals: TrustedBiddingData?
)

Represents the information necessary for a custom audience to participate in ad selection.

@ExperimentalFeatures.Ext14OptIn
CustomAudience(
    buyer: AdTechIdentifier,
    name: String,
    dailyUpdateUri: Uri,
    biddingLogicUri: Uri,
    ads: List<AdData>,
    activationTime: Instant?,
    expirationTime: Instant?,
    userBiddingSignals: AdSelectionSignals?,
    trustedBiddingSignals: TrustedBiddingData?,
    auctionServerRequestFlags: Int,
    priority: Double
)

Public functions

open operator Boolean
equals(other: Any?)

Checks whether two CustomAudience objects contain the same information.

open Int

Returns the hash of the CustomAudience object's data.

open String

Public properties

Instant?

optional activation time may be set in the future, in order to serve a delayed activation.

List<AdData>

the list of AdData objects is a full and complete list of the ads that will be served by this CustomAudience during the ad selection process.

Int

the bitfield of auction server request flags.

Uri

the target URI used to fetch bidding logic when a custom audience participates in the ad selection process.

AdTechIdentifier

A buyer is identified by a domain in the form "buyerexample.com".

Uri

a URI that points to a buyer-operated server that hosts updated bidding data and ads metadata to be used in the on-device ad selection process.

Instant?

optional expiration time.

String

The custom audience's name is an arbitrary string provided by the owner and buyer on creation of the CustomAudience object.

Double

representing the priority of this custom audience.

TrustedBiddingData?

optional trusted bidding data, consists of a URI pointing to a trusted server for buyers' bidding data and a list of keys to query the server with.

AdSelectionSignals?

optional User bidding signals, provided by buyers to be consumed by buyer-provided JavaScript during ad selection in an isolated execution environment.

Constants

FLAG_AUCTION_SERVER_REQUEST_DEFAULT

@ExperimentalFeatures.Ext14OptIn
const val FLAG_AUCTION_SERVER_REQUEST_DEFAULT = 0: Int

Default value for auction server request flag.

FLAG_AUCTION_SERVER_REQUEST_OMIT_ADS

@ExperimentalFeatures.Ext14OptIn
const val FLAG_AUCTION_SERVER_REQUEST_OMIT_ADSInt

This auction server request flag indicates to the service that ads for this Custom Audience can be omitted in the server auction payload.

PRIORITY_DEFAULT

@ExperimentalFeatures.Ext14OptIn
const val PRIORITY_DEFAULT = 0.0: Double

Default priority for this custom audience.

Public constructors

CustomAudience

Added in 1.0.0
CustomAudience(
    buyer: AdTechIdentifier,
    name: String,
    dailyUpdateUri: Uri,
    biddingLogicUri: Uri,
    ads: List<AdData>,
    activationTime: Instant? = null,
    expirationTime: Instant? = null,
    userBiddingSignals: AdSelectionSignals? = null,
    trustedBiddingSignals: TrustedBiddingData? = null
)

Represents the information necessary for a custom audience to participate in ad selection.

A custom audience is an abstract grouping of users with similar demonstrated interests. This class is a collection of some data stored on a device that is necessary to serve advertisements targeting a single custom audience.

Parameters
buyer: AdTechIdentifier

A buyer is identified by a domain in the form "buyerexample.com".

name: String

The custom audience's name is an arbitrary string provided by the owner and buyer on creation of the CustomAudience object.

dailyUpdateUri: Uri

a URI that points to a buyer-operated server that hosts updated bidding data and ads metadata to be used in the on-device ad selection process. The URI must use HTTPS.

biddingLogicUri: Uri

the target URI used to fetch bidding logic when a custom audience participates in the ad selection process. The URI must use HTTPS.

ads: List<AdData>

the list of AdData objects is a full and complete list of the ads that will be served by this CustomAudience during the ad selection process.

activationTime: Instant? = null

optional activation time may be set in the future, in order to serve a delayed activation. If the field is not set, the object will be activated at the time of joining.

expirationTime: Instant? = null

optional expiration time. Once it has passed, a custom audience is no longer eligible for daily ad/bidding data updates or participation in the ad selection process. The custom audience will then be deleted from memory by the next daily update.

userBiddingSignals: AdSelectionSignals? = null

optional User bidding signals, provided by buyers to be consumed by buyer-provided JavaScript during ad selection in an isolated execution environment.

trustedBiddingSignals: TrustedBiddingData? = null

optional trusted bidding data, consists of a URI pointing to a trusted server for buyers' bidding data and a list of keys to query the server with.

CustomAudience

Added in 1.1.0-beta12
@ExperimentalFeatures.Ext14OptIn
CustomAudience(
    buyer: AdTechIdentifier,
    name: String,
    dailyUpdateUri: Uri,
    biddingLogicUri: Uri,
    ads: List<AdData>,
    activationTime: Instant? = null,
    expirationTime: Instant? = null,
    userBiddingSignals: AdSelectionSignals? = null,
    trustedBiddingSignals: TrustedBiddingData? = null,
    auctionServerRequestFlags: Int = 0,
    priority: Double = 0.0
)
Parameters
buyer: AdTechIdentifier

A buyer is identified by a domain in the form "buyerexample.com".

name: String

The custom audience's name is an arbitrary string provided by the owner and buyer on creation of the CustomAudience object.

dailyUpdateUri: Uri

a URI that points to a buyer-operated server that hosts updated bidding data and ads metadata to be used in the on-device ad selection process. The URI must use HTTPS.

biddingLogicUri: Uri

the target URI used to fetch bidding logic when a custom audience participates in the ad selection process. The URI must use HTTPS.

ads: List<AdData>

the list of AdData objects is a full and complete list of the ads that will be served by this CustomAudience during the ad selection process.

activationTime: Instant? = null

optional activation time may be set in the future, in order to serve a delayed activation. If the field is not set, the object will be activated at the time of joining.

expirationTime: Instant? = null

optional expiration time. Once it has passed, a custom audience is no longer eligible for daily ad/bidding data updates or participation in the ad selection process. The custom audience will then be deleted from memory by the next daily update.

userBiddingSignals: AdSelectionSignals? = null

optional User bidding signals, provided by buyers to be consumed by buyer-provided JavaScript during ad selection in an isolated execution environment.

trustedBiddingSignals: TrustedBiddingData? = null

optional trusted bidding data, consists of a URI pointing to a trusted server for buyers' bidding data and a list of keys to query the server with.

auctionServerRequestFlags: Int = 0

the bitfield of auction server request flags. These are flags that influence the creation of the payload generated by the getAdSelectionData API.

priority: Double = 0.0

representing the priority of this custom audience. If there is insufficient space during the buyer input generation in the getAdSelectionData call, the service will attempt to include the highest priority custom audiences first.

Public functions

equals

open operator fun equals(other: Any?): Boolean

Checks whether two CustomAudience objects contain the same information.

hashCode

open fun hashCode(): Int

Returns the hash of the CustomAudience object's data.

toString

open fun toString(): String

Public properties

activationTime

Added in 1.0.0
val activationTimeInstant?

optional activation time may be set in the future, in order to serve a delayed activation. If the field is not set, the object will be activated at the time of joining.

ads

Added in 1.0.0
val adsList<AdData>

the list of AdData objects is a full and complete list of the ads that will be served by this CustomAudience during the ad selection process.

auctionServerRequestFlags

Added in 1.1.0-beta12
@ExperimentalFeatures.Ext14OptIn
val auctionServerRequestFlagsInt

the bitfield of auction server request flags. These are flags that influence the creation of the payload generated by the getAdSelectionData API.

biddingLogicUri

Added in 1.0.0
val biddingLogicUriUri

the target URI used to fetch bidding logic when a custom audience participates in the ad selection process. The URI must use HTTPS.

buyer

Added in 1.0.0
val buyerAdTechIdentifier

A buyer is identified by a domain in the form "buyerexample.com".

dailyUpdateUri

Added in 1.0.0
val dailyUpdateUriUri

a URI that points to a buyer-operated server that hosts updated bidding data and ads metadata to be used in the on-device ad selection process. The URI must use HTTPS.

expirationTime

Added in 1.0.0
val expirationTimeInstant?

optional expiration time. Once it has passed, a custom audience is no longer eligible for daily ad/bidding data updates or participation in the ad selection process. The custom audience will then be deleted from memory by the next daily update.

name

Added in 1.0.0
val nameString

The custom audience's name is an arbitrary string provided by the owner and buyer on creation of the CustomAudience object.

priority

Added in 1.1.0-beta12
@ExperimentalFeatures.Ext14OptIn
val priorityDouble

representing the priority of this custom audience. If there is insufficient space during the buyer input generation in the getAdSelectionData call, the service will attempt to include the highest priority custom audiences first.

trustedBiddingSignals

Added in 1.0.0
val trustedBiddingSignalsTrustedBiddingData?

optional trusted bidding data, consists of a URI pointing to a trusted server for buyers' bidding data and a list of keys to query the server with.

userBiddingSignals

Added in 1.0.0
val userBiddingSignalsAdSelectionSignals?

optional User bidding signals, provided by buyers to be consumed by buyer-provided JavaScript during ad selection in an isolated execution environment.