Attributes

open class Attributes

Attributes representation, can be set to Conversation, User, Participant or Message.

Constructors

Attributes
Link copied to clipboard
open fun Attributes()
Create NULL attributes.
Attributes
Link copied to clipboard
open fun Attributes(object: JSONObject)
Initialize attributes with a JSONObject.
Attributes
Link copied to clipboard
open fun Attributes(array: JSONArray)
Initialize attributes with a JSONArray.
Attributes
Link copied to clipboard
open fun Attributes(string: String)
Initialize attributes with a String.
Attributes
Link copied to clipboard
open fun Attributes(number: Number)
Initialize attributes with a Number.
Attributes
Link copied to clipboard
open fun Attributes(value: Boolean)
Initialize attributes with a boolean value.

Functions

getBoolean
Link copied to clipboard
open fun getBoolean(): Boolean
Returns Boolean stored in attributes if getType of attributes is BOOLEAN, otherwise returns null.
getJSONArray
Link copied to clipboard
open fun getJSONArray(): JSONArray
Returns JSONArray stored in attributes if getType of attributes is ARRAY, otherwise returns null.
getJSONObject
Link copied to clipboard
open fun getJSONObject(): JSONObject
Returns JSONObject stored in attributes if getType of attributes is OBJECT, otherwise returns null.
getNumber
Link copied to clipboard
open fun getNumber(): Number
Returns Number stored in attributes if getType of attributes is NUMBER, otherwise returns null.
getString
Link copied to clipboard
open fun getString(): String
Returns String stored in attributes if getType of attributes is STRING, otherwise returns null.
getType
Link copied to clipboard
open fun getType(): Attributes.Type
Returns Type of attributes

Properties

DEFAULT
Link copied to clipboard
val DEFAULT: Attributes
Default attributes value.