EventBuilders.TileInteractionEvent.Builder


public final class EventBuilders.TileInteractionEvent.Builder


Builder for TileInteractionEvent

Summary

Public constructors

Builder(int tileId, int eventType)

A builder for TileInteractionEvent.

Public methods

@NonNull EventBuilders.TileInteractionEvent

Builds an instance from accumulated values.

@NonNull EventBuilders.TileInteractionEvent.Builder
@RequiresSchemaVersion(major = 1, minor = 400)
setTimestamp(@NonNull Instant instant)

Sets the timestamp of when the interaction was reported.

Public constructors

Builder

Added in 1.4.0
public Builder(int tileId, int eventType)

A builder for TileInteractionEvent.

Parameters
int tileId

the instance ID of the tile, allocated when the tile instance is added to the carousel. This ID will remain the same for this tile instance as long it is not removed from the carousel.

int eventType

the type of the TileInteractionEvent.

Throws
java.lang.IllegalArgumentException

when the provided eventType is equal to UNKNOWN or not defined by EventType.

Public methods

build

Added in 1.4.0
public @NonNull EventBuilders.TileInteractionEvent build()

Builds an instance from accumulated values.

setTimestamp

Added in 1.4.0
@RequiresSchemaVersion(major = 1, minor = 400)
public @NonNull EventBuilders.TileInteractionEvent.Builder setTimestamp(@NonNull Instant instant)

Sets the timestamp of when the interaction was reported. Defaults to now (Created at the time of Builder constructor call) if not provided.