类 Notification.Builder

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

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

    • Builder

      public Builder()
  • 方法详细资料

    • id

      public Notification.Builder id(String id)
      非必填,创建成功后返回

      示例值:6981801914270744596

      参数:
      id -
      返回:
    • jobName

      public Notification.Builder jobName(String jobName)
      必填,任务名称

      示例值:测试推送任务

      参数:
      jobName -
      返回:
    • status

      public Notification.Builder status(Integer status)
      非必填,创建成功后返回

      示例值:0

      参数:
      status -
      返回:
    • createUser

      public Notification.Builder createUser(NotificationUser createUser)
      非必填,创建人

      示例值:{"avatar_url":"","name":"","user_id":"ou_7277fd1262bfafc363d5b2a1f9c2ac90"}

      参数:
      createUser -
      返回:
    • createdAt

      public Notification.Builder createdAt(String createdAt)
      非必填,创建时间(毫秒时间戳)

      示例值:1626332244719

      参数:
      createdAt -
      返回:
    • updateUser

      public Notification.Builder updateUser(NotificationUser updateUser)
      非必填,更新用户

      示例值:{"avatar_url":"","name":"","user_id":"ou_7277fd1262bfafc363d5b2a1f9c2ac90"}

      参数:
      updateUser -
      返回:
    • updatedAt

      public Notification.Builder updatedAt(String updatedAt)
      非必填,更新时间(毫秒时间戳)

      示例值:1626332244719

      参数:
      updatedAt -
      返回:
    • targetUserCount

      public Notification.Builder targetUserCount(Integer targetUserCount)
      非必填,目标推送用户总数

      示例值:1

      参数:
      targetUserCount -
      返回:
    • sentUserCount

      public Notification.Builder sentUserCount(Integer sentUserCount)
      非必填,已推送用户总数

      示例值:1

      参数:
      sentUserCount -
      返回:
    • readUserCount

      public Notification.Builder readUserCount(Integer readUserCount)
      非必填,已读用户总数

      示例值:1

      参数:
      readUserCount -
      返回:
    • sendAt

      public Notification.Builder sendAt(String sendAt)
      非必填,推送任务触发时间(毫秒时间戳)

      示例值:1626332244719

      参数:
      sendAt -
      返回:
    • pushContent

      public Notification.Builder pushContent(String pushContent)
      必填,推送内容,详见:https://open.feishu.cn/tool/cardbuilder?from=howtoguide

      示例值:{ \"config\": { \"wide_screen_mode\": true }, \"elements\": [ { \"tag\": \"div\", \"text\": { \"tag\": \"lark_md\", \"content\": \"[飞书](https://www.feishu.cn)整合即时沟通、日历、音视频会议、云文档、云盘、工作台等功能于一体,成就组织和个人,更高效、更愉悦。\" } } ] }

      参数:
      pushContent -
      返回:
    • pushType

      public Notification.Builder pushType(Integer pushType)
      必填,;0(定时推送:push_scope不能等于3) 1(新人入职推送:push_scope必须等于1或者3;new_staff_scope_type不能为空)

      示例值:0

      参数:
      pushType -
      返回:
    • pushScopeType

      public Notification.Builder pushScopeType(Integer pushScopeType)
      必填,;推送范围(服务台私信) 0:组织内全部成员(user_list和department_list必须为空) 1:不推送任何成员(user_list和department_list必须为空,chat_list不可为空) 2:推送到部分成员(user_list或department_list不能为空) 3:入职新人 以上四种状态,chat_list都相对独立,只有在推送范围为1时,必须需要设置chat_list

      示例值:0

      参数:
      pushScopeType -
      返回:
    • newStaffScopeType

      public Notification.Builder newStaffScopeType(Integer newStaffScopeType)
      非必填,;新人入职范围类型(push_type为1时生效) 0:组织内所有新人 1:组织内特定的部门(new_staff_scope_department_list 字段不能为空)

      示例值:0

      参数:
      newStaffScopeType -
      返回:
    • newStaffScopeDepartmentList

      public Notification.Builder newStaffScopeDepartmentList(NotificationDepartment[] newStaffScopeDepartmentList)
      非必填,新人入职生效部门列表

      示例值:[{"department_id":"od_7c1a2815c9846b5e518b950de0e62de8"}]

      参数:
      newStaffScopeDepartmentList -
      返回:
    • userList

      public Notification.Builder userList(NotificationUser[] userList)
      非必填,push推送到成员列表

      示例值:[{"user_id":"ou_7277fd1262bfafc363d5b2a1f9c2ac90"}]

      参数:
      userList -
      返回:
    • departmentList

      public Notification.Builder departmentList(NotificationDepartment[] departmentList)
      非必填,push推送到的部门信息列表

      示例值:[{"department_id":"od_7c1a2815c9846b5e518b950de0e62de8"}]

      参数:
      departmentList -
      返回:
    • chatList

      public Notification.Builder chatList(NotificationChat[] chatList)
      非必填,push推送到的会话列表(群)

      示例值:[{"chat_id":"oc_7c1a2815c9846b5e518b950de0e62de8"}]

      参数:
      chatList -
      返回:
    • ext

      public Notification.Builder ext(String ext)
      非必填,预留扩展字段

      示例值:{}

      参数:
      ext -
      返回:
    • build

      public Notification build()