类 BotMessage.Builder

java.lang.Object
com.lark.oapi.service.helpdesk.v1.model.BotMessage.Builder
封闭类:
BotMessage

public static class BotMessage.Builder extends Object
  • 构造器详细资料

    • Builder

      public Builder()
  • 方法详细资料

    • msgType

      public BotMessage.Builder msgType(String msgType)
      消息类型

      示例值:post

      参数:
      msgType -
      返回:
    • msgType

      public BotMessage.Builder msgType(BotMessageMsgTypeEnum msgType)
      消息类型

      示例值:post

      参数:
      msgType - BotMessageMsgTypeEnum
      返回:
    • content

      public BotMessage.Builder content(String content)
      消息内容,json格式结构序列化成string。格式说明参考: [发送消息content说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/im-v1/message/create_json)

      示例值:{\"post\":{\"zh_cn\":{\"title\":\"some title\",\"content\":[[{\"tag\":\"text\",\"text\":\"some content\"}]]}}}

      参数:
      content -
      返回:
    • receiverId

      public BotMessage.Builder receiverId(String receiverId)
      接收消息用户id

      示例值:ou_7346484524

      参数:
      receiverId -
      返回:
    • receiveType

      public BotMessage.Builder receiveType(String receiveType)
      接收消息方式,chat(服务台专属服务群)或user(服务台机器人私聊)。若选择专属服务群,用户有正在处理的工单将会发送失败。默认以chat方式发送。

      示例值:chat

      参数:
      receiveType -
      返回:
    • receiveType

      public BotMessage.Builder receiveType(BotMessageReceiveTypeEnum receiveType)
      接收消息方式,chat(服务台专属服务群)或user(服务台机器人私聊)。若选择专属服务群,用户有正在处理的工单将会发送失败。默认以chat方式发送。

      示例值:chat

      参数:
      receiveType - BotMessageReceiveTypeEnum
      返回:
    • build

      public BotMessage build()