UpdateAdCounterHistogramRequest


open class UpdateAdCounterHistogramRequest
kotlin.Any
   ↳ android.adservices.adselection.UpdateAdCounterHistogramRequest

Request object wrapping the required arguments needed to update an ad counter histogram.

The ad counter histograms, which are historical logs of events which are associated with an ad counter key and an ad event type, are used to inform frequency cap filtering when using the Protected Audience APIs.

Summary

Nested classes

Builder for UpdateAdCounterHistogramRequest objects.

Public methods
open Boolean
equals(other: Any?)

Checks whether the UpdateAdCounterHistogramRequest objects contain the same information.

open Int

Gets the ad event type which, along with an ad's counter keys, identifies which histogram should be updated.

open Long

Gets the ad selection ID with which the rendered ad's events are associated.

open AdTechIdentifier

Gets the caller adtech entity's AdTechIdentifier.

open Int

Returns the hash of the UpdateAdCounterHistogramRequest object's data.

open String

Public methods

equals

open fun equals(other: Any?): Boolean

Checks whether the UpdateAdCounterHistogramRequest 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.

getAdEventType

open fun getAdEventType(): Int

Gets the ad event type which, along with an ad's counter keys, identifies which histogram should be updated.

Return
Int Value is android.adservices.common.FrequencyCapFilters.AD_EVENT_TYPE_INVALID, android.adservices.common.FrequencyCapFilters#AD_EVENT_TYPE_WIN, android.adservices.common.FrequencyCapFilters#AD_EVENT_TYPE_IMPRESSION, android.adservices.common.FrequencyCapFilters#AD_EVENT_TYPE_VIEW, android.adservices.common.FrequencyCapFilters#AD_EVENT_TYPE_CLICK, android.adservices.common.FrequencyCapFilters.AD_EVENT_TYPE_MIN, or android.adservices.common.FrequencyCapFilters.AD_EVENT_TYPE_MAX

getAdSelectionId

open fun getAdSelectionId(): Long

Gets the ad selection ID with which the rendered ad's events are associated.

For more information about the ad selection ID, see AdSelectionOutcome.

The ad must have been selected from Protected Audience ad selection in the last 24 hours, and the ad selection call must have been initiated from the same app as the current calling app. Event histograms for all ad counter keys associated with the ad specified by the ad selection ID will be updated for the ad event type from getAdEventType(), to be used in Protected Audience frequency cap filtering.

getCallerAdTech

open fun getCallerAdTech(): AdTechIdentifier

Gets the caller adtech entity's AdTechIdentifier.

The adtech using this UpdateAdCounterHistogramRequest object must have enrolled with the Privacy Sandbox and be allowed to act on behalf of the calling app. The specified adtech is not required to be the same adtech as either the buyer which owns the rendered ad or the seller which initiated the ad selection associated with the ID returned by getAdSelectionId().

For more information about API requirements and exceptions, see android.adservices.adselection.AdSelectionManager#updateAdCounterHistogram(android.adservices.adselection.UpdateAdCounterHistogramRequest,java.util.concurrent.Executor,android.os.OutcomeReceiver).

Return
AdTechIdentifier This value cannot be null.

hashCode

open fun hashCode(): Int

Returns the hash of the UpdateAdCounterHistogramRequest object's data.

Return
Int a hash code value for this object.

toString

open fun toString(): String