FrequencyCapFilters


class FrequencyCapFilters : Parcelable
kotlin.Any
   ↳ android.adservices.common.FrequencyCapFilters

A container for the ad filters that are based on frequency caps.

No more than 20 frequency cap filters may be associated with a single ad.

Frequency caps filters combine an event type with a list of KeyedFrequencyCap objects to define a collection of ad filters. If any of these frequency caps are exceeded for a given ad, the ad will be removed from the group of ads submitted to a buyer adtech's bidding function.

Summary

Nested classes

Builder for creating FrequencyCapFilters objects.

Constants
static Int

static Int

static Int

static Int

The WIN ad event type is automatically populated within the Protected Audience service for any winning ad which is returned from Protected Audience ad selection.

Inherited constants
Public methods
Boolean
equals(other: Any?)

Checks whether the FrequencyCapFilters objects contain the same information.

MutableList<KeyedFrequencyCap!>

Gets the list of KeyedFrequencyCap objects that will filter on the AD_EVENT_TYPE_CLICK event type.

MutableList<KeyedFrequencyCap!>

Gets the list of KeyedFrequencyCap objects that will filter on the AD_EVENT_TYPE_IMPRESSION event type.

MutableList<KeyedFrequencyCap!>

Gets the list of KeyedFrequencyCap objects that will filter on the AD_EVENT_TYPE_VIEW event type.

MutableList<KeyedFrequencyCap!>

Gets the list of KeyedFrequencyCap objects that will filter on the AD_EVENT_TYPE_WIN event type.

Int

Returns the hash of the FrequencyCapFilters object's data.

String

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<FrequencyCapFilters!>

Constants

AD_EVENT_TYPE_CLICK

static val AD_EVENT_TYPE_CLICK: Int
Value: 3

AD_EVENT_TYPE_IMPRESSION

static val AD_EVENT_TYPE_IMPRESSION: Int
Value: 1

AD_EVENT_TYPE_VIEW

static val AD_EVENT_TYPE_VIEW: Int
Value: 2

AD_EVENT_TYPE_WIN

static val AD_EVENT_TYPE_WIN: Int

The WIN ad event type is automatically populated within the Protected Audience service for any winning ad which is returned from Protected Audience ad selection.

It should not be used to manually update an ad counter histogram.

Value: 0

Public methods

equals

fun equals(other: Any?): Boolean

Checks whether the FrequencyCapFilters objects contain the same information.

Parameters
obj the reference object with which to compare.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

getKeyedFrequencyCapsForClickEvents

fun getKeyedFrequencyCapsForClickEvents(): MutableList<KeyedFrequencyCap!>

Gets the list of KeyedFrequencyCap objects that will filter on the AD_EVENT_TYPE_CLICK event type.

These frequency caps apply to events which correlate to a click as interpreted by an adtech. Click events are counted when the android.adservices.adselection.AdSelectionManager#updateAdCounterHistogram( * UpdateAdCounterHistogramRequest, Executor, OutcomeReceiver) API is invoked with the AD_EVENT_TYPE_CLICK event type.

Return
MutableList<KeyedFrequencyCap!> This value cannot be null.

getKeyedFrequencyCapsForImpressionEvents

fun getKeyedFrequencyCapsForImpressionEvents(): MutableList<KeyedFrequencyCap!>

Gets the list of KeyedFrequencyCap objects that will filter on the AD_EVENT_TYPE_IMPRESSION event type.

These frequency caps apply to events which correlate to an impression as interpreted by an adtech.

Note that events are not automatically counted when calling android.adservices.adselection.AdSelectionManager#reportImpression(ReportImpressionRequest, * Executor, OutcomeReceiver). Instead, the AD_EVENT_TYPE_IMPRESSION event type must be updated using the android.adservices.adselection.AdSelectionManager#updateAdCounterHistogram( * UpdateAdCounterHistogramRequest, Executor, OutcomeReceiver) API.

Return
MutableList<KeyedFrequencyCap!> This value cannot be null.

getKeyedFrequencyCapsForViewEvents

fun getKeyedFrequencyCapsForViewEvents(): MutableList<KeyedFrequencyCap!>

Gets the list of KeyedFrequencyCap objects that will filter on the AD_EVENT_TYPE_VIEW event type.

These frequency caps apply to events which correlate to a view as interpreted by an adtech. View events are counted when the android.adservices.adselection.AdSelectionManager#updateAdCounterHistogram( * UpdateAdCounterHistogramRequest, Executor, OutcomeReceiver) API is invoked with the AD_EVENT_TYPE_VIEW event type.

Return
MutableList<KeyedFrequencyCap!> This value cannot be null.

getKeyedFrequencyCapsForWinEvents

fun getKeyedFrequencyCapsForWinEvents(): MutableList<KeyedFrequencyCap!>

Gets the list of KeyedFrequencyCap objects that will filter on the AD_EVENT_TYPE_WIN event type.

These frequency caps apply to events for ads that were selected as winners in ad selection. Winning ads are used to automatically increment the associated counter keys on the win event type.

Note that the AD_EVENT_TYPE_WIN event type cannot be updated manually using the android.adservices.adselection.AdSelectionManager#updateAdCounterHistogram( * UpdateAdCounterHistogramRequest, Executor, OutcomeReceiver) API.

Return
MutableList<KeyedFrequencyCap!> This value cannot be null.

hashCode

fun hashCode(): Int

Returns the hash of the FrequencyCapFilters object's data.

Return
Int a hash code value for this object.

toString

fun toString(): String

writeToParcel

fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

static val CREATOR: Parcelable.Creator<FrequencyCapFilters!>