ReportEventRequest.Builder


public static final class ReportEventRequest.Builder
extends Object

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


Builder for ReportEventRequest objects.

Summary

Public constructors

Builder(long adSelectionId, String eventKey, String eventData, int reportingDestinations)

Public methods

ReportEventRequest build()

Builds the ReportEventRequest object.

ReportEventRequest.Builder setAdSelectionId(long adSelectionId)

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

ReportEventRequest.Builder setData(String eventData)

Sets the ad event data.

ReportEventRequest.Builder setInputEvent(InputEvent inputEvent)

Sets the input event associated with the user interaction.

ReportEventRequest.Builder setKey(String eventKey)

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

ReportEventRequest.Builder setReportingDestinations(int reportingDestinations)

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

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

public Builder (long adSelectionId, 
                String eventKey, 
                String eventData, 
                int reportingDestinations)

Parameters
adSelectionId long

eventKey String: This value cannot be null.

eventData String: This value cannot be null.

reportingDestinations int: Value is either 0 or a combination of ReportEventRequest.FLAG_REPORTING_DESTINATION_SELLER, ReportEventRequest.FLAG_REPORTING_DESTINATION_BUYER, and android.adservices.adselection.ReportEventRequest.FLAG_REPORTING_DESTINATION_COMPONENT_SELLER

Public methods

build

public ReportEventRequest build ()

Builds the ReportEventRequest object.

Returns
ReportEventRequest This value cannot be null.

setAdSelectionId

public ReportEventRequest.Builder setAdSelectionId (long adSelectionId)

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

See ReportEventRequest.getAdSelectionId() for more information.

Parameters
adSelectionId long

Returns
ReportEventRequest.Builder This value cannot be null.

setData

public ReportEventRequest.Builder setData (String eventData)

Sets the ad event data.

See ReportEventRequest.getData() for more information.

Parameters
eventData String: This value cannot be null.

Returns
ReportEventRequest.Builder This value cannot be null.

setInputEvent

public ReportEventRequest.Builder setInputEvent (InputEvent inputEvent)

Sets the input event associated with the user interaction.

See ReportEventRequest.getInputEvent() for more information.

Parameters
inputEvent InputEvent: This value may be null.

Returns
ReportEventRequest.Builder This value cannot be null.

setKey

public ReportEventRequest.Builder setKey (String eventKey)

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

See ReportEventRequest.getKey() for more information.

Parameters
eventKey String: This value cannot be null.

Returns
ReportEventRequest.Builder This value cannot be null.

setReportingDestinations

public ReportEventRequest.Builder setReportingDestinations (int reportingDestinations)

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

See ReportEventRequest.getReportingDestinations() for more information.

Parameters
reportingDestinations int: Value is either 0 or a combination of ReportEventRequest.FLAG_REPORTING_DESTINATION_SELLER, ReportEventRequest.FLAG_REPORTING_DESTINATION_BUYER, and android.adservices.adselection.ReportEventRequest.FLAG_REPORTING_DESTINATION_COMPONENT_SELLER

Returns
ReportEventRequest.Builder This value cannot be null.