UpdateAdCounterHistogramRequest.Builder

public static final class UpdateAdCounterHistogramRequest.Builder
extends Object

java.lang.Object
   ↳ android.adservices.adselection.UpdateAdCounterHistogramRequest.Builder


Builder for UpdateAdCounterHistogramRequest objects.

Summary

Public constructors

Builder()

Public methods

UpdateAdCounterHistogramRequest build()

Builds the UpdateAdCounterHistogramRequest object.

UpdateAdCounterHistogramRequest.Builder setAdEventType(int adEventType)

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

UpdateAdCounterHistogramRequest.Builder setAdSelectionId(long adSelectionId)

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

UpdateAdCounterHistogramRequest.Builder setCallerAdTech(AdTechIdentifier callerAdTech)

Sets the caller adtech entity's AdTechIdentifier.

Inherited methods

Public constructors

Public methods

build

public UpdateAdCounterHistogramRequest build ()

Builds the UpdateAdCounterHistogramRequest object.

Returns
UpdateAdCounterHistogramRequest This value cannot be null.

Throws
NullPointerException if the caller's AdTechIdentifier is not set
IllegalArgumentException if the ad selection ID is not set

setAdEventType

public UpdateAdCounterHistogramRequest.Builder setAdEventType (int adEventType)

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

See UpdateAdCounterHistogramRequest.getAdEventType() for more information.

Parameters
adEventType int: Value is android.adservices.common.FrequencyCapFilters.AD_EVENT_TYPE_INVALID, FrequencyCapFilters.AD_EVENT_TYPE_WIN, FrequencyCapFilters.AD_EVENT_TYPE_IMPRESSION, FrequencyCapFilters.AD_EVENT_TYPE_VIEW, or FrequencyCapFilters.AD_EVENT_TYPE_CLICK

Returns
UpdateAdCounterHistogramRequest.Builder This value cannot be null.

setAdSelectionId

public UpdateAdCounterHistogramRequest.Builder setAdSelectionId (long adSelectionId)

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

See UpdateAdCounterHistogramRequest.getAdSelectionId() for more information.

Parameters
adSelectionId long

Returns
UpdateAdCounterHistogramRequest.Builder This value cannot be null.

setCallerAdTech

public UpdateAdCounterHistogramRequest.Builder setCallerAdTech (AdTechIdentifier callerAdTech)

Sets the caller adtech entity's AdTechIdentifier.

See UpdateAdCounterHistogramRequest.getCallerAdTech() for more information.

Parameters
callerAdTech AdTechIdentifier: This value cannot be null.

Returns
UpdateAdCounterHistogramRequest.Builder This value cannot be null.