addProperty

Adds a custom property to the event.

If the total added properties exceed MAX_TOTAL_PROPERTIES_SIZE in size it will cause the event to be invalid.

Return

The custom event builder.

Parameters

name

The property name.

value

A property value.


open fun addProperty(@NonNull @Size(min = 1) name: String, @NonNull @Size(min = 1) value: String): CustomEvent.Builder
open fun addProperty(@NonNull @Size(min = 1) name: String, value: Int): CustomEvent.Builder
open fun addProperty(@NonNull @Size(min = 1) name: String, value: Long): CustomEvent.Builder

Adds a custom property to the event.

If the total added properties exceed MAX_TOTAL_PROPERTIES_SIZE in size it will cause the event to be invalid.

Return

The custom event builder.

Parameters

name

The property name.

value

The property value.


open fun addProperty(@NonNull @Size(min = 1) name: String, value: Double): CustomEvent.Builder

Adds a custom property to the event.

If the total number of properties exceed MAX_TOTAL_PROPERTIES_SIZE it will cause the event to be invalid.

Return

The custom event builder.

Parameters

name

The property name.

value

The property value.

Throws

if the value is infinite or not a number


open fun addProperty(@NonNull @Size(min = 1) name: String, value: Boolean): CustomEvent.Builder

Adds a custom property to the event.

If the total number of properties exceed MAX_TOTAL_PROPERTIES_SIZE it will cause the event to be invalid.

Return

The custom event builder.

Parameters

name

The property name.

value

The property value.