put

open fun put(@NonNull key: String, @NonNull value: String): BatchEventAttributes

Add a string attribute for the specified key

Return

Same BatchEventAttributes instance, for chaining

Parameters

key

Attribute key. Should be made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.

value

String value to add. Can't be longer than 64 characters, and can't be empty or null. For better results, you should trim/lowercase your strings, and use slugs when possible.


open fun put(@NonNull key: String, @NonNull value: URI): BatchEventAttributes

Add an URL attribute for the specified key

Return

Same BatchEventAttributes instance, for chaining

Parameters

key

Attribute key. Should be made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.

value

URL value to add. Can't be longer than 2048 characters, and can't be empty or null.


open fun put(@NonNull key: String, value: Float): BatchEventAttributes

Add a float attribute for the specified key

Return

Same BatchEventAttributes instance, for chaining

Parameters

key

Attribute key. Should be made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.

value

Float value to add.


open fun put(@NonNull key: String, value: Double): BatchEventAttributes

Add a double attribute for the specified key

Return

Same BatchEventAttributes instance, for chaining

Parameters

key

Attribute key. Should be made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.

value

Double value to add.


open fun put(@NonNull key: String, value: Int): BatchEventAttributes

Add a integer attribute for the specified key

Return

Same BatchEventAttributes instance, for chaining

Parameters

key

Attribute key. Should be made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.

value

Integer value to add.


open fun put(@NonNull key: String, value: Long): BatchEventAttributes

Add a long attribute for the specified key

Return

Same BatchEventAttributes instance, for chaining

Parameters

key

Attribute key. Should be made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.

value

Long value to add.


open fun put(@NonNull key: String, value: Boolean): BatchEventAttributes

Add a boolean attribute for the specified key

Return

Same BatchEventAttributes instance, for chaining

Parameters

key

Attribute key. Should be made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.

value

Boolean value to add.


open fun put(@NonNull key: String, @NonNull value: Date): BatchEventAttributes

Add a date attribute for the specified key

Return

Same BatchEventAttributes instance, for chaining

Parameters

key

Attribute key. Should be made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.

value

Date value to add.


Add an object attribute for the specified key

Return

Same BatchEventAttributes instance, for chaining

Parameters

key

Attribute key. Should be made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.

value

BatchEventAttributes value to add.