EventLogRecord.Builder

public static final class EventLogRecord.Builder
extends Object

java.lang.Object
   ↳ android.adservices.ondevicepersonalization.EventLogRecord.Builder


A builder for EventLogRecord

Summary

Public constructors

Builder()

Public methods

EventLogRecord build()

Builds the instance.

EventLogRecord.Builder setData(ContentValues value)

Additional data to be logged.

EventLogRecord.Builder setRequestLogRecord(RequestLogRecord value)

The existing RequestLogRecord that this payload should be associated with.

EventLogRecord.Builder setRowIndex(int value)

The index of the row in an existing RequestLogRecord that this payload should be associated with.

EventLogRecord.Builder setType(int value)

The service-assigned identifier that identifies this payload.

Inherited methods

Public constructors

Public methods

build

public EventLogRecord build ()

Builds the instance. This builder should not be touched after calling this!

Returns
EventLogRecord This value cannot be null.

setData

public EventLogRecord.Builder setData (ContentValues value)

Additional data to be logged. Can be null if no additional data needs to be written as part of the event, and only the occurrence of the event needs to be logged.

Parameters
value ContentValues: This value cannot be null.

Returns
EventLogRecord.Builder

setRequestLogRecord

public EventLogRecord.Builder setRequestLogRecord (RequestLogRecord value)

The existing RequestLogRecord that this payload should be associated with.

Parameters
value RequestLogRecord: This value cannot be null.

Returns
EventLogRecord.Builder This value cannot be null.

setRowIndex

public EventLogRecord.Builder setRowIndex (int value)

The index of the row in an existing RequestLogRecord that this payload should be associated with.

Parameters
value int: Value is 0 or greater

Returns
EventLogRecord.Builder This value cannot be null.

setType

public EventLogRecord.Builder setType (int value)

The service-assigned identifier that identifies this payload. Each row in RequestLogRecord can be associated with up to one event of a specified type. The platform drops events if another event with the same type already exists for a row in RequestLogRecord. Must be >0 and <128. This allows up to 127 events to be written for each row in RequestLogRecord.

Parameters
value int: Value is between 1 and 127 inclusive

Returns
EventLogRecord.Builder This value cannot be null.