类 EMNewMessage
java.lang.Object
com.easemob.im.api.model.EMNewMessage
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-03-27T17:20:33.693628+08:00[Asia/Shanghai]")
public class EMNewMessage
extends Object
EMNewMessage
-
嵌套类概要
嵌套类 -
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明customEvent(String customEvent) customExts(Object customExts) booleanstatic EMNewMessageCreate an instance of EMNewMessage given an JSON string用户自定义的事件类型。用户自定义的事件属性,类型必须是 Map<String,String>,最多可以包含 16 个元素。getMsg()修改后的消息内容。getType()修改的消息类型: - txt:文本消息; - custom:自定义消息inthashCode()voidsetCustomEvent(String customEvent) voidsetCustomExts(Object customExts) voidvoidtoJson()Convert an instance of EMNewMessage to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
字段详细资料
-
构造器详细资料
-
EMNewMessage
public EMNewMessage()
-
-
方法详细资料
-
type
-
getType
修改的消息类型: - txt:文本消息; - custom:自定义消息- 返回:
- type
-
setType
-
msg
-
getMsg
修改后的消息内容。该字段只对文本消息生效- 返回:
- msg
-
setMsg
-
customEvent
-
getCustomEvent
用户自定义的事件类型。该参数的值必须满足正则表达式 [a-zA-Z0-9-_/\\.]{1,32},长度为 1-32 个字符。该字段只对自定义消息生效- 返回:
- customEvent
-
setCustomEvent
-
customExts
-
getCustomExts
用户自定义的事件属性,类型必须是 Map<String,String>,最多可以包含 16 个元素。该字段只对自定义消息生效- 返回:
- customExts
-
setCustomExts
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- 参数:
jsonElement- JSON Element- 抛出:
IOException- if the JSON Element is invalid with respect to EMNewMessage
-
fromJson
Create an instance of EMNewMessage given an JSON string- 参数:
jsonString- JSON string- 返回:
- An instance of EMNewMessage
- 抛出:
IOException- if the JSON string is invalid with respect to EMNewMessage
-
toJson
Convert an instance of EMNewMessage to an JSON string- 返回:
- JSON string
-