Builder

open class Builder

Builder class for com.urbanairship.analytics.CustomEvent Objects.

Constructors

Link copied to clipboard
constructor(@NonNull @Size(min = 1, max = 255) eventName: String)
Creates a new custom event builder The event name must be between 1 and 255 characters or the event will be invalid.

Functions

Link copied to clipboard
open fun addProperty(@NonNull @Size(min = 1) name: String, value: Boolean): CustomEvent.Builder
open fun addProperty(@NonNull @Size(min = 1) name: String, value: Double): CustomEvent.Builder
open fun addProperty(@NonNull @Size(min = 1) name: String, value: Int): CustomEvent.Builder
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: Long): CustomEvent.Builder
Adds a custom property to the event.
Link copied to clipboard
Builds the custom event.
Link copied to clipboard
Sets the event value.
Sets the event value from a String.
Link copied to clipboard
open fun setInteraction(@Nullable @Size(min = 1, max = 255) interactionType: String, @Nullable @Size(min = 1, max = 255) interactionId: String): CustomEvent.Builder
Sets the interaction type and ID for the event.
Link copied to clipboard
Sets the interaction type and ID from a Message Center message.
Link copied to clipboard
Sets a JsonMap representing the event properties.
Link copied to clipboard
open fun setTransactionId(@Nullable @Size(min = 1, max = 255) transactionId: String): CustomEvent.Builder
Sets the transaction ID.