Added in API level 35

Builder


class Builder
kotlin.Any
   ↳ android.adservices.ondevicepersonalization.EventLogRecord.Builder

A builder for EventLogRecord

Summary

Public constructors

Public methods
EventLogRecord

Builds the instance.

EventLogRecord.Builder

Additional data to be logged.

EventLogRecord.Builder

The existing RequestLogRecord that this payload should be associated with.

EventLogRecord.Builder
setRowIndex(value: Int)

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

EventLogRecord.Builder
setType(value: Int)

The service-assigned identifier that identifies this payload.

Public constructors

Builder

Added in API level 35
Builder()

Public methods

build

Added in API level 35
fun build(): EventLogRecord

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

Return
EventLogRecord This value cannot be null.

setData

Added in API level 35
fun setData(value: ContentValues?): EventLogRecord.Builder

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 may be null.

setRequestLogRecord

Added in API level 35
fun setRequestLogRecord(value: RequestLogRecord?): EventLogRecord.Builder

The existing RequestLogRecord that this payload should be associated with. In an implementation of IsolatedWorker#onExecute(ExecuteInput, android.os.OutcomeReceiver), this should be set to a value returned by LogReader#getRequests(Instant, Instant). In an implementation of IsolatedWorker#onEvent(EventInput, android.os.OutcomeReceiver), this should be set to null because the payload will be automatically associated with the current RequestLogRecord.

Parameters
value RequestLogRecord?: This value may be null.

setRowIndex

Added in API level 35
fun setRowIndex(value: Int): EventLogRecord.Builder

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

Parameters
value Int: Value is 0 or greater
Return
EventLogRecord.Builder This value cannot be null.

setType

Added in API level 35
fun setType(value: Int): EventLogRecord.Builder

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. If unspecified, the default is 1.

Parameters
value Int: Value is between 1 and 127 inclusive
Return
EventLogRecord.Builder This value cannot be null.