用户向代理发送的消息。
UserMessage 显示在“数据”中,“message”字段对象从其 Google Cloud Pub/Sub 订阅中接收。“数据”字段是一个 base64 编码的字符串,代理必须解码它以匹配 UserMessage 结构。
JSON 表示法 |
---|
{ "senderPhoneNumber": string, "messageId": string, "sendTime": string, "agentId": string, // Union field |
字段 | |
---|---|
senderPhoneNumber |
发送短信的用户的电话号码(采用 E.164 格式)。 |
messageId |
唯一的信息 ID,由发送邮件的用户的 RCS 客户端分配。代理应将具有相同 (messageId, senderPhoneNumber) 对的消息视为意外重复。 |
sendTime |
消息的发送时间。 时间戳采用 RFC3339 世界协调时间(UTC,即“祖鲁时”)格式,精确到纳秒,最多九个小数位。示例: |
agentId |
代理的唯一标识符。由 RCS Business Messaging 设置。 |
联合字段 content 。消息 content 的内容只能是下列其中一项: |
|
text |
文本,特别是通过自然用户输入创建的字符串,而不是建议的回复。 |
userFile |
媒体文件。 |
location |
位置信息。请注意,该位置不一定是用户的位置。用户能够将任意位置信息发送给代理。 |
suggestionResponse |
用户点按建议的回复或操作后生成的回复。 |