类 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
  • 字段详细资料

    • SERIALIZED_NAME_TYPE

      public static final String SERIALIZED_NAME_TYPE
      另请参阅:
    • SERIALIZED_NAME_MSG

      public static final String SERIALIZED_NAME_MSG
      另请参阅:
    • SERIALIZED_NAME_CUSTOM_EVENT

      public static final String SERIALIZED_NAME_CUSTOM_EVENT
      另请参阅:
    • SERIALIZED_NAME_CUSTOM_EXTS

      public static final String SERIALIZED_NAME_CUSTOM_EXTS
      另请参阅:
    • openapiFields

      public static HashSet<String> openapiFields
    • openapiRequiredFields

      public static HashSet<String> openapiRequiredFields
  • 构造器详细资料

    • EMNewMessage

      public EMNewMessage()
  • 方法详细资料

    • type

      public EMNewMessage type(String type)
    • getType

      @Nullable public String getType()
      修改的消息类型: - txt:文本消息; - custom:自定义消息
      返回:
      type
    • setType

      public void setType(String type)
    • msg

      public EMNewMessage msg(String msg)
    • getMsg

      @Nullable public String getMsg()
      修改后的消息内容。该字段只对文本消息生效
      返回:
      msg
    • setMsg

      public void setMsg(String msg)
    • customEvent

      public EMNewMessage customEvent(String customEvent)
    • getCustomEvent

      @Nullable public String getCustomEvent()
      用户自定义的事件类型。该参数的值必须满足正则表达式 [a-zA-Z0-9-_/\\.]{1,32},长度为 1-32 个字符。该字段只对自定义消息生效
      返回:
      customEvent
    • setCustomEvent

      public void setCustomEvent(String customEvent)
    • customExts

      public EMNewMessage customExts(Object customExts)
    • getCustomExts

      @Nullable public Object getCustomExts()
      用户自定义的事件属性,类型必须是 Map<String,String>,最多可以包含 16 个元素。该字段只对自定义消息生效
      返回:
      customExts
    • setCustomExts

      public void setCustomExts(Object customExts)
    • equals

      public boolean equals(Object o)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      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

      public static EMNewMessage fromJson(String jsonString) throws IOException
      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

      public String toJson()
      Convert an instance of EMNewMessage to an JSON string
      返回:
      JSON string