Builder


class Builder
kotlin.Any
   ↳ android.adservices.adselection.ReportEventRequest.Builder

Builder for ReportEventRequest objects.

Summary

Public constructors
Builder(adSelectionId: Long, eventKey: String, eventData: String, reportingDestinations: Int)

Public methods
ReportEventRequest

Builds the ReportEventRequest object.

ReportEventRequest.Builder
setAdSelectionId(adSelectionId: Long)

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

ReportEventRequest.Builder
setData(eventData: String)

Sets the ad event data.

ReportEventRequest.Builder
setInputEvent(inputEvent: InputEvent?)

Sets the input event associated with the user interaction.

ReportEventRequest.Builder
setKey(eventKey: String)

Sets the event key, the type of ad event to be reported.

ReportEventRequest.Builder
setReportingDestinations(reportingDestinations: Int)

Sets the bitfield of reporting destinations to report to (buyer, seller, or both).

Public constructors

Builder

Builder(
    adSelectionId: Long,
    eventKey: String,
    eventData: String,
    reportingDestinations: Int)
Parameters
eventKey String: This value cannot be null.
eventData String: This value cannot be null.
reportingDestinations Int: Value is either 0 or a combination of android.adservices.adselection.ReportEventRequest#FLAG_REPORTING_DESTINATION_SELLER, and android.adservices.adselection.ReportEventRequest#FLAG_REPORTING_DESTINATION_BUYER

Public methods

build

fun build(): ReportEventRequest

Builds the ReportEventRequest object.

Return
ReportEventRequest This value cannot be null.

setAdSelectionId

fun setAdSelectionId(adSelectionId: Long): ReportEventRequest.Builder

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

See getAdSelectionId() for more information.

Return
ReportEventRequest.Builder This value cannot be null.

setData

fun setData(eventData: String): ReportEventRequest.Builder

Sets the ad event data.

See getData() for more information.

Parameters
eventData String: This value cannot be null.
Return
ReportEventRequest.Builder This value cannot be null.

setInputEvent

fun setInputEvent(inputEvent: InputEvent?): ReportEventRequest.Builder

Sets the input event associated with the user interaction.

See getInputEvent() for more information.

Parameters
inputEvent InputEvent?: This value may be null.
Return
ReportEventRequest.Builder This value cannot be null.

setKey

fun setKey(eventKey: String): ReportEventRequest.Builder

Sets the event key, the type of ad event to be reported.

See getKey() for more information.

Parameters
eventKey String: This value cannot be null.
Return
ReportEventRequest.Builder This value cannot be null.

setReportingDestinations

fun setReportingDestinations(reportingDestinations: Int): ReportEventRequest.Builder

Sets the bitfield of reporting destinations to report to (buyer, seller, or both).

See getReportingDestinations() for more information.

Parameters
reportingDestinations Int: Value is either 0 or a combination of android.adservices.adselection.ReportEventRequest#FLAG_REPORTING_DESTINATION_SELLER, and android.adservices.adselection.ReportEventRequest#FLAG_REPORTING_DESTINATION_BUYER
Return
ReportEventRequest.Builder This value cannot be null.