类 EMRecallMessage
java.lang.Object
com.easemob.im.api.model.EMRecallMessage
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-01-25T14:51:53.998371+08:00[Asia/Shanghai]")
public class EMRecallMessage
extends Object
EMRecallMessage
-
嵌套类概要
嵌套类 -
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明booleanstatic EMRecallMessageCreate an instance of EMRecallMessage given an JSON string要撤回消息的会话类型: - chat:单聊; - groupchat:群聊 ; - chatroom:聊天室getForce()是否支持撤回超过服务器存储时长的消息。getFrom()消息撤回方的用户 ID。getMsgId()要撤回消息的消息 ID。消息撤回相关的扩展信息getTo()要撤回消息的接收方。inthashCode()recallMessageExtensionInfo(String recallMessageExtensionInfo) voidsetChatType(String chatType) voidvoidvoidvoidsetRecallMessageExtensionInfo(String recallMessageExtensionInfo) voidtoJson()Convert an instance of EMRecallMessage to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
字段详细资料
-
构造器详细资料
-
EMRecallMessage
public EMRecallMessage()
-
-
方法详细资料
-
msgId
-
getMsgId
要撤回消息的消息 ID。由于每次只能撤销一条消息,因此只能传入一个消息 ID- 返回:
- msgId
-
setMsgId
-
to
-
getTo
要撤回消息的接收方。 - 单聊为接收方用户 ID; - 群聊为群组 ID; - 聊天室聊天为聊天室 ID。 若不传入该参数,请求失败- 返回:
- to
-
setTo
-
chatType
-
getChatType
要撤回消息的会话类型: - chat:单聊; - groupchat:群聊 ; - chatroom:聊天室- 返回:
- chatType
-
setChatType
-
from
-
getFrom
消息撤回方的用户 ID。若不传该参数,默认为 admin- 返回:
- from
-
setFrom
-
force
-
getForce
是否支持撤回超过服务器存储时长的消息。 - true:是。这种情况下,你可以撤回在撤回时长内的消息,也可以撤回超过服务器存储时长的消息。对于后者,该接口会撤回接收方在本地保存的消息。若消息发送的时间介于你的撤回时长和服务器存储时长之间,则撤回失败。例如,如果消息的撤回时长为 2 分钟,在服务器上的存储时长为 7 天,你可以撤回 2 分钟以内发送的消息或发送时间超过 7 天的消息;若消息发送了 3 分钟,则撤回失败。 - false:否,不支持撤回超过服务器存储时长的消息。如果你采用默认的 2 分钟撤回时长或联系了商务设置了撤回时长,服务器只能撤回指定时长内发送的消息,超过该时长的消息无法撤回。例如,你设置的撤回时长为 3 分钟,若消息发送了 4 分钟,则撤回失败- 返回:
- force
-
setForce
-
recallMessageExtensionInfo
-
getRecallMessageExtensionInfo
消息撤回相关的扩展信息- 返回:
- recallMessageExtensionInfo
-
setRecallMessageExtensionInfo
-
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 EMRecallMessage
-
fromJson
Create an instance of EMRecallMessage given an JSON string- 参数:
jsonString- JSON string- 返回:
- An instance of EMRecallMessage
- 抛出:
IOException- if the JSON string is invalid with respect to EMRecallMessage
-
toJson
Convert an instance of EMRecallMessage to an JSON string- 返回:
- JSON string
-