UserMessage

用户向代理发送的消息。

UserMessage 显示在“数据”中,“message”字段对象从其 Google Cloud Pub/Sub 订阅中接收。“数据”字段是一个 base64 编码的字符串,代理必须解码它以匹配 UserMessage 结构。

JSON 表示法
{
  "senderPhoneNumber": string,
  "messageId": string,
  "sendTime": string,
  "agentId": string,

  // Union field content can be only one of the following:
  "text": string,
  "userFile": {
    object (UserFile)
  },
  "location": {
    object (LatLng)
  },
  "suggestionResponse": {
    object (SuggestionResponse)
  }
  // End of list of possible types for union field content.
}
字段
senderPhoneNumber

string

发送短信的用户的电话号码(采用 E.164 格式)。

messageId

string

唯一的信息 ID,由发送邮件的用户的 RCS 客户端分配。代理应将具有相同 (messageId, senderPhoneNumber) 对的消息视为意外重复。

sendTime

string (Timestamp format)

消息的发送时间。

时间戳采用 RFC3339 世界协调时间(UTC,即“祖鲁时”)格式,精确到纳秒,最多九个小数位。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z"

agentId

string

代理的唯一标识符。由 RCS Business Messaging 设置。

联合字段 content。消息 content 的内容只能是下列其中一项:
text

string

文本,特别是通过自然用户输入创建的字符串,而不是建议的回复。

userFile

object (UserFile)

媒体文件。

location

object (LatLng)

位置信息。请注意,该位置不一定是用户的位置。用户能够将任意位置信息发送给代理。

suggestionResponse

object (SuggestionResponse)

用户点按建议的回复或操作后生成的回复。