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.

Public constructors

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

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.

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.

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.

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
)
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.

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.

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.

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.